I use Squirrel SQL to connect to a JavaDB/Derby database on my desktop. I can run SQL queries.
But how can I list all tables in the database? And preferably all column and column types.
All Database Tables If you want to list all tables in the Oracle database, you can query the dba_tables view. SELECT table_name FROM dba_tables ORDER BY table_name ASC; This view (and all others starting with dba_) are meant for database administrators.
To list the tables in the current database, you can run the \dt command, in psql : If you want to perform an SQL query instead, run this: SELECT table_name FROM information_schema.
Sometimes I noticed that doing the above may not result in the tables showing. Before I figured this out, my table node will not be expandable and I can never get a list of the tables.
After a lot of searching on the internet, I learnt that you need to choose the schema from the catalog drop down box located at the upper left portion of the squirrel sql client before the icons to be able to get the table list for that particular schema.
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With