View All Tables – Sqlite3

Not really something that I’ve broken (yet), but definitely something I found useful when starting out with rails – how to view all tables:

Start Sqlite3 i.e.
chris@chris-VirtualBox:~/site$ sqlite3 -line db/development.sqlite3
SQLite version 3.7.4
Enter “.help” for instructions
Enter SQL statements terminated with a “;”

Then simply enter the following:
sqlite> .tables
carts message_recipients products taggings
categories message_statuses schema_migrations tags
comments messages store_pages user_settings
images order_items store_settings users
line_items orders stores
locations product_images sub_orders
sqlite>

Good Luck!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s