Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Nagesh
Starting Member
1 Post |
Posted - 2003-10-20 : 03:00:42
|
| Hi,Can someone help me in getting the user tables and views from a databse using t-sql or is there any stored procedure...Bye |
|
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
Posted - 2003-10-20 : 03:08:48
|
Look up the Informatio schema views in the Books Online. They can provide a lot of information on tables, views, columns and procedures in the database.SELECT * FROM INFORMATION_SCHEMA.Tablesthe above query returns all tables and views in the database.Owais Make it idiot proof and someone will make a better idiot |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2003-10-20 : 03:12:16
|
| SELECT * FROM INFORMATION_SCHEMA.TablesSELECT * FROM INFORMATION_SCHEMA.ViewsDamian |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2003-10-20 : 03:12:50
|
Dammit.Got distracted by work and Owais got in first Damian |
 |
|
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
Posted - 2003-10-20 : 05:08:54
|
sniped!Curiously, SELECT * FROM INFORMATION_SCHEMA.Tables returns all Views as well.Owais Make it idiot proof and someone will make a better idiot |
 |
|
|
|
|
|