Results 1 to 2 of 2

Thread: .schema in SQLite under ubuntu don't show tables

  1. #1
    Join Date
    Jul 2008
    Beans
    66
    Distro
    Ubuntu

    .schema in SQLite under ubuntu don't show tables

    Hi everybody!
    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:
    >sqlite .schema
    >sqlite
    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
    nir

  2. #2
    Join Date
    May 2010
    Location
    SE England
    Beans
    210

    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

    Bouncingwilf

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •