Re: [sqlite] having problem in creating new database in MAC OS

2009-08-21 Thread Jean-Denis Muys
On 8/21/09 14:18 , "shakeeb khan"  wrote:

> tell me what is a proper way of
> creating database in sqllite

Here is a sample terminal session on my Mac (possibly very poorly
reformatted by my mail client):

jdmbook:~ klee$ sqlite3 mydb.db
SQLite version 3.6.12
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .databases
seq  name file
---  ---
--
0main /Volumes/Prune/Users/klee/mydb.db
sqlite> create table test (id integer, name char(256), tel char(32));
sqlite> select * from test;
sqlite> insert into test (id, name, tel) values (1, 'John Doe',
'555-1234-5678');
sqlite> select * from test;
1|John Doe|555-1234-5678
sqlite> 


I hope that helps,

Jean-Denis

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] having problem in creating new database in MAC OS

2009-08-21 Thread Igor Tandetnik
shakeeb khan wrote:
> i want to make a database in sqlite using MAC terminal but having
> problem in creating.kinldy tell me a proper syntax
>
> i was trying : "sqlite>sqlite mydb.db "
>
> it shows me "-->" and hault the program kinldy tell me what is a
> proper way of creating database in sqllite

You first ran "sqlite" without parameters, so now you are within sqlite 
command line. Now you are trying to run "sqlite mydb.db" - but that's 
not a valid SQLite command, it's a shell command.

So figure out what you want to do. From the shell, run "sqlite mydb.db". 
>From inside sqlite command line, run ".open mydb.db"

Igor Tandetnik 



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users