"Kofi" <ko*******@gmail.com> wrote in message
news:5c**************************@posting.google.c om...
I need just the names of tables, views and sprocs within a SQL Server
database. What's the easiest way to do this?
SELECT table_name AS object_name,
table_schema AS schema_name,
table_type AS object_type
FROM INFORMATION_SCHEMA.TABLES
UNION ALL
SELECT routine_name AS object_name,
routine_schema AS schema_name,
routine_type AS object_type
FROM INFORMATION_SCHEMA.ROUTINES
WHERE routine_type = 'PROCEDURE'
ORDER BY object_type, schema_name, object_name
--
JAG