May 15, 2013 at 2:02 pm
In T-SQL (2000), I have a query that lists all Tables and Columns, along with Data Types.
select *
from information_schema.columns
order by table_name, ordinal_position
However, I have multiple databases on the SQL Server and I don't see which Database the Tables belong too. Any ideas on how I can adjust this to give the database along with the tables. Or a method I can run this against a specific database, rather than all databases. Thanks.
May 15, 2013 at 2:11 pm
Found the answer on another site:
select DB_NAME() as Database_name, * from information_schema.columns
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy