0

Using SQLLite, is it possible to see columns that can / can't be null or see the default values for them?

I'm deciding between MySQL or SQLLite for my development DB, and just noticed this. MySQL you can easily do DESC my_table. SQLLite, using SQLLite Database Browser you can do "Database Structure", but it doesn't show any information beyond type.

Don P
  • 60,113
  • 114
  • 300
  • 432
  • Also note 2 things: 1) it's "SQLite", not "SQLLite"; 2) SQLite Data Browser is not the only SQLite management application out there, other applications can show you more than just a datatype. – Googie Jan 31 '14 at 10:12

1 Answers1

0

I assume you are talking about SQLite with Rails. In that case, during the creation of tables, you can do something like this:

t.integer :foo :default => 0, :null => false

Mix and match as necessary.

Benjamin Tan Wei Hao
  • 9,621
  • 3
  • 30
  • 56