# Solved: SqlServer Equivalent to 'Select * from tab' -URGENT!!!!



## Prashanti (Apr 24, 2006)

Hi !!!

What is the Equivalent to 'Select * from tab' in SqlServer.

Please help!!!!

Very Urgent!!!!!

Thanks very much in advance!!!!


----------



## Chicon (Jul 29, 2004)

You've just to insert *all* the column names of the table after the 'SELECT' word :
Example : if *tab* has 2 columns named *col1* and *col2*, then the statement must be :
*SELECT col1, col2 FROM tab*


----------



## Prashanti (Apr 24, 2006)

What I meant was I need a list of all tables in a particular DB in Sql Server!!!!
Tab is not the name of a table. In Oracle when we type 'select * from tab' it lists out all the tables,views in the database.


----------



## Prashanti (Apr 24, 2006)

Found it!!!!!!!!!!

The Sql Server equivalent for 'select * from tab;' in Oracle is

select TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
from INFORMATIO_SCHEMA.TABLES order by TABLE_TYPE,TABLE_NAME

 :up::up::up:


----------

