Column information of all the tables in a database (SqlServer2008 R2, MySQL, Oracle)

 

Different RDBMS provides system views with information about all the columns and their definitions in the database tables 

 

SQLServer :  SYS.COLUMNS (Microsoft) 

                   INFORMATION_SCHEMA.COLUMNS (ANSI SQL)

Oracle       : ALL_TAB_COLUMNS (ANSI SQL)

My Sql       : INFORMATION_SCHEMA.COLUMNS (ANSI SQL)

 

Microsoft SQL server’s INFORMATION_SCHEMA.COLUMNS is equivalent to ALL_TAB_COLUMNS in oracle and INFORMATION_SCHEMA.COLUMNS in Mysql 

ALL_TAB_COLUMNS in oracle  is equivalent to  Microsoft SQL server’s INFORMATION_SCHEMA.COLUMNS and INFORMATION_SCHEMA.COLUMNS in Mysql 

INFORMATION_SCHEMA.COLUMNS in Mysql is equivalent to  ALL_TAB_COLUMNS in oracle  Microsoft SQL server’s INFORMATION_SCHEMA.COLUMNS and 

 

SQL Server 

select *  from INFORMATION_SCHEMA.COLUMNS

Oracle

select * from ALL_TAB_COLUMNS

 

My SQL 

select *  from INFORMATION_SCHEMA.COLUMNS

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s