Richard Nagle wrote:

Last login: Thu Feb 24 00:08:34 on ttyp1
Welcome to Darwin!
fastmac:~ rn$ /Applications/SQLite/sqlite; exit
SQLite version 2.8.13
Enter ".help" for instructions
sqlite> .database
0           main                  1           temp
               sqlite> create database contacts; # This is standard sql ?
SQL error: near "database": syntax error
sqlite>


So: at the command line: sqlite>
what is the correct syntax command to create a NEW database, called Contacts???

There is no syntax command to do that. With the sqlite shell, you just give the name of the database on the command line. From within C, you explicitly open a connection to the database.


There is a command to attach a database (which is SQLite-specific). However, from the docs it seems that this is: a) Not what you want, and b) Only for attaching preexisting databases.

http://www.sqlite.org/lang_attach.html


HTH

Ulrik Petersen

--
Ulrik Petersen, MA, B.Sc.
University of Aalborg, Denmark





Reply via email to