Which query will give the table structure with column definitions in SQL?
In DBTools for Sybase, it's sp_columns your_table_name
.
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'student'
In MySQL you can use DESCRIBE <table_name>
Highlight table name in the console and press ALT+F1
For SQL Server use exec sp_help
USE db_name;
exec sp_help 'dbo.table_name'
For MySQL, use describe
DESCRIBE table_name;
For Sybase aka SQL Anywhere the following command outputs the structure of a table:
DESCRIBE 'TABLE_NAME';