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 |
|
hamedkh
Starting Member
2 Posts |
Posted - 2011-01-16 : 14:36:21
|
| hi im new in sql .i want to write a procedure that it can find tables name in database ,for ex,if i have three table in my database ,i can find thier name,what can i do??????thanksim sorry for my bad writing |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2011-01-16 : 14:58:17
|
| SELECT name FROM sys.Tables; |
 |
|
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2011-01-16 : 15:52:37
|
INFORMATION_SCHEMA.Tables will also work. Poor planning on your part does not constitute an emergency on my part. |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2011-01-16 : 17:02:35
|
IF OBJECT_ID('Table1') IS NULL -- NOT FOUNDIF OBJECT_ID('Table1') IS NOT NULL -- FOUND N 56°04'39.26"E 12°55'05.63" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-01-18 : 09:56:10
|
| EXEC sp_tablesMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|