Hi fnds,
I want to call first 100 tables from my database.what is code for this.iam not giving any numbers or ID's for those tables.
thanks in advance.
The SP_TABLES system stored procedure might be what you want. See http://msdn2.microsoft.com/en-us/library/aa260318(SQL.80).aspx for more information.
Regards,
Uwa.
|||Another option would be to use the information schema views:
Select * from INFORMATION_SCHEMA.TABLES
Make sure you filter out the MS shipped tables using the
OBJECTPROPERTY(OBJECT_ID(Table_NAME),'Is_ms_shipped') = 0
as a condition.
Jens K. Suessmeyer
http://www.sqlserver2005.de
No comments:
Post a Comment