Query:
IF EXISTS (SELECT 1
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE='BASE TABLE'
AND TABLE_NAME='tablename')
SELECT 'table exists.'
ELSE
SELECT 'table does not exist.'
Hope it will help you.
| .NET Mixer |
ASP.NET Tutorials, C#.NET, VB.NET, AJAX, SQL Server, XML, Javascript, Jquery, GridView Tutorials / Articles and Code Examples. |
IF EXISTS (SELECT 1
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE='BASE TABLE'
AND TABLE_NAME='tablename')
SELECT 'table exists.'
ELSE
SELECT 'table does not exist.'
| Want To Search More? | |
| Google Search on Internet |
|
|
| Article Categories |
| About Me | ||
|
| Good to Know |
| Articles |
| Forums |
| Freelance IT jobs |
| Submitted To |
| Free ASP.NET articles,C#.NET,VB.NET tutorials and Examples,Ajax,SQL Server,Javascript,Jquery,XML,GridView Articles and code examples -- by Shawpnendu Bikash | |





0 comments:
I WOULD BE DELIGHTED TO HEAR FROM YOU