469,578 Members | 1,801 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,578 developers. It's quick & easy.

Finding and Deleting Table

How we can find out by Query that wether a particular table exists?
Jul 11 '07 #1
2 1052
srinit
43
How we can find out by Query that wether a particular table exists?
Hi,
you can find the table in sys.tables
if exists(select name from sys.tables where name='table name')
drop table tablename
Jul 11 '07 #2
you can find tables by using this query

Select name from sysobjects where xtype = 'u' and name like 'tblname%'

and for deleting the table

drop table tblName
Jul 12 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Nathan Bloom | last post: by
46 posts views Thread by DP | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.