Difference between revisions of "What is the syntax to view structure of table?"

From SQLZOO
Jump to: navigation, search
 
Line 15: Line 15:
 
<source lang='sql' class='def e-sqlserver'>sp_columns @table_name=bbc
 
<source lang='sql' class='def e-sqlserver'>sp_columns @table_name=bbc
 
</source>
 
</source>
<source lang='sql' class='def e-mysql'>show columns from gisq.bbc
+
<source lang='sql' class='def e-mysql'>show columns from bbc
 
</source>
 
</source>
 
<source lang='sql' class='def'>SQL
 
<source lang='sql' class='def'>SQL

Latest revision as of 09:57, 18 July 2012

What is the syntax to view structure of table?

schema:gisq

What is the syntax to view structure of table?

 
SELECT * FROM syscat.COLUMNS
WHERE tabname= 'BBC'
SELECT * FROM all_tab_columns
 WHERE TABLE_NAME='BBC'
sp_columns @TABLE_NAME=bbc
SHOW COLUMNS FROM bbc
SQL
Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense