Hassan Schroeder wrote:
Just started using Instant rails 1.7. I want to look at the MySQL
and it just gives me a null!
Uh, no surprise -- where did you find that "command"? In any case,
> SHOW DATABASES;
...list of databases will be displayed...
> USE foo_development;
> SHOW TABLES;
...list of tables will be displayed...
Reading a basic SQL book or tutorial plus skimming the MySQL
documentation would probably be a good idea
Hassan Schroeder ------------------------ email@example.com
Thanks! I had actually done the MySQL tutorial...and looked there
before I posted (honest!)
I just realised my confusion...my commands show what databases are
currently selected...I was reading the wrong section.
I thought though that the database I was using with instant rails would
be 'connected' (i.e. I was working on it at the time and had just
created a new table) so my command:
Should be valid non? I had just read this bit in the docs:
3.4. Getting Information About Databases and Tables
What if you forget the name of a database or table, or what the
structure of a given table is (for example, what its columns are
called)? MySQL addresses this problem through several statements that
provide information about the databases and tables it supports.
You have previously seen SHOW DATABASES, which lists the databases
managed by the server. To find out which database is currently selected,
use the DATABASE() function: