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 |
|
dataforums
Starting Member
14 Posts |
Posted - 2005-05-18 : 10:05:05
|
| Hi, I am trying to create dynamic tables but I want to check if they already exists in the database. Can anyone please tell me how to check if a table already exists in a sql server database??Thanks in advance. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-05-18 : 10:11:07
|
| if exists(select * from sysobjects where name='tablename') print 'Table Exists'elseprint 'Table does not exist'MadhivananFailing to plan is Planning to fail |
 |
|
|
dataforums
Starting Member
14 Posts |
Posted - 2005-05-18 : 13:26:25
|
| Thanks!! |
 |
|
|
|
|
|