MySQL Gets the field definition for the specified table (assuming the table name is MyTable):
DESCRIBE mytable
Gets the field definition for the specified table in MySQLServer (assuming the table name is MyTable):
select syscols.name as column_name,st.name as data_type,syscomm.text as data_default,syscols.isnullable as NULLABLE from syscolumns syscolsleft join Systypes St on syscols.xusertype=st.xusertypeleft join syscomments syscomm on syscols.cdefault=syscomm.idwhere syscols.id=object_id (N" mytable ") order Span class= "Hljs-keyword" >by syscols.id,syscols.colorder
The All_tab_columns table in Oracle is the field definition for all tables in the system, where the TABLE_NAME field is the table name, so the field definition for the specified table is obtained (assuming the table name is MyTable):
select COLUMN_NAME,DATA_TYPE,DATA_DEFAULT,NULLABLE from all_tab_columns where TABLE_NAME ="MYTABLE"
The Syscat.columns table in DB2 is the field definition for all tables in the system, where the TabName field is the table name, so the field definition for the specified table is obtained (assuming the table is named MyTable):
select COLNAME as COLUMN_NAME, TYPENAME as DATA_TYPE,DEFAULT asDATA_DEFAULT,NULLS as NULLABLEfrom syscat.columns where TABNAME="MYTABLE"
Gets the field definition for the specified table