.schema in SQLite under ubuntu don't show tables
I just started using SQLite3 and I made an sql file which create some tables, I went through the process of transferring it into a database and now i want to use the .schema command to see my create file but instead i get this situation:
the prompt simply comes back without showing me the tables i created.
can someone explain to me how to show the tables with .schema under ubuntu.
thank you in advace
Re: .schema in SQLite under ubuntu don't show tables
Your command syntax is correct and should show you the "commands" used to create the tables. Possibly your sql file failed?
I suggest you try and create a dummy table in the database (you can drop it later) and rerun the .schema command eg
sqlite> CREATE TABLE DUMMY( Dummyname as char);
then re-run .schema - that should show you the above command. If that works, then I suggest you re-check the sql file.
Probably not necessary to tell you but Sqlite does not automatically append .db or similar to any file you create - you must give full names to sqlite file open statements.
For example; if you create a file called test.db and then open the database with: slite3 test, you will not open your test.db file but create a new empty sqlite database called test !
Hope this helps