Describe table structure
sp_help tablename in sql server -- sp_help [ [ @objname = ] 'name' ]
desc tablename in oracle -- DESCRIBE { table-Name | view-Name }
It depends from the database you use. Here is an incomplete list:
- sqlite3:
.schema table_name
- Postgres (psql):
\d table_name
- SQL Server:
sp_help table_name
(orsp_columns table_name
for only columns) - Oracle DB2:
desc table_name
ordescribe table_name
- MySQL:
describe table_name
(orshow columns from table_name
for only columns)