Mar 13, 2008

SQLServer : Tables list

This SQL returns the table list on current database.

SELECT 
  name AS TableName
FROM 
  sysobjects 
WHERE 
      OBJECTPROPERTY(id, N'IsUserTable') = 1 
  AND status >= 0 
ORDER BY 
  name

No comments: