Databases

Databases

Connect to a database and list database, schemas, tables and definitions

MS SQL Server

Use [schema].[database name]
SELECT * FROM information_schema.tables;

Oracle

sqlplus username/password@database-name
select tablespace_name, table_name from user_tables;
select tablespace_name, table_name from dba_tables;
select tablespace_name, table_name from all_tables;

MySQL

mysql [-u username] [-h hostname] database-name
show databases
use <database-name>
show tables
desc <table-name>
DB2

db2 connect to <database-name>
db2 list tables for all
db2 list tables for schema <schema-name>
db2 describe table <table-schema.table-name>

PostgreSQL

psql [-U username] [-h hostname] database-name
\list
\dt
\d <table-name>

Microsoft SQL Server Reference

SQL Server Central
http://www.sqlservercentral.com

 

Oracle Reference

MySQL Reference