| Author: ManoKarthikeyan 10 Jul 2006 | Member Level: Silver | Rating:  Points: 2 |
show tables;
|
| Author: vishal 10 Jul 2006 | Member Level: Gold | Rating:  Points: 2 |
To get all tables in the database you can write select statement as –
SELECT * FROM sysObjects where xtype = ‘U’
U means user tables
|
| Author: Vimal Verma 10 Jul 2006 | Member Level: Gold | Rating:  Points: 2 |
select * from sys.tables
|
| Author: divya 13 Oct 2008 | Member Level: Gold | Rating:  Points: 1 |
select * from sysObjects where Xtype='U' or select * from sys.tables where type='U'
|
| Author: Kavitha 13 Oct 2008 | Member Level: Silver | Rating:  Points: 1 |
To get all the tables, use sp_tables in a paticuler DB.
|
| Author: Deepika Haridas 07 Nov 2008 | Member Level: Diamond | Rating:  Points: 0 |
show tables;
Thanks & Regards, Deepika Editor
If U want to shine like a SUN..First U have to burn like the SUN!! Need a Guide? Join my mentor program..
|
| Author: Mohammed Khaja Najmuddin 10 Nov 2008 | Member Level: Gold | Rating:  Points: 1 |
This will display information of all tables . select * from information_schema.tables;
|
| Author: B. Gopal Surya Prakash 11 Nov 2008 | Member Level: Silver | Rating:  Points: 5 |
Below queries gives only objects in table
select * from sysObjects
You can different objects based on XType field in where clause
for User Tables Xtype = 'U'
for View Xtype='V'
for procedures Xtype='P'
for Scalar Functions Xtype = 'FN'
Below query gives tables & view information select * from information_schema.Tables
Below query gives View & View text information select * from information_schema.Tables
|
| Author: Rajalakshmi 13 Nov 2008 | Member Level: Silver | Rating:  Points: 1 |
hi...
Simply u use the query
sp_tables under ur database
|
| Author: Sravya 18 Nov 2008 | Member Level: Gold | Rating:  Points: 1 |
sql server 2000
select name from sysobjects where type ='u'
it will display only tables
|
| Author: Sriman N Vangala 19 Nov 2008 | Member Level: Diamond | Rating:  Points: 4 |
Various alternatives are there in order to get all the tables information
In sql server 2005, we can use the following sp_tables or SELECT * FROM sys.Objects where type = 'U' or select * from sys.tables or select * from information_schema.tables where table_type= 'BASE TABLE'
In sql server 2000, we can use the following
SELECT * FROM sysObjects where xtype = 'U'
|