Checking database has a table.
-
How to check whether a database has a table out of that database
Yet another way to get a list of tables in an ADO.net-supported database:
System.Data.Common.DbConnection con =
this.command.Connection as System.Data.Common.DbConnection ;if ( con != null )
{
System.Data.DataTable temp = con.GetSchema
(
"TABLES"
) ;temp.DefaultView.RowFilter = "TABLE\_TYPE='TABLE' OR TABLE\_TYPE='BASE TABLE'" ; temp.DefaultView.Sort = "TABLE\_NAME" ;
-
How to check whether a database has a table out of that database
-
How to check whether a database has a table out of that database
Hey, What database are you talking about? MySQL, Microsoft SQL Server ORACLE ....
-
Hey, What database are you talking about? MySQL, Microsoft SQL Server ORACLE ....
Sql Server
-
Sql Server
Once Again, What version of SQL Server? SQL Server 2000 SQL Server 2003 or What?
-
yuvarajujogi wrote:
How to check whether a database has a table out of that database
What are you going to do if it doesn't?
I want to create a table in that database similar to the table in another database.
-
Sql Server
-
I want to create a table in that database similar to the table in another database.
try with this..
If Object_ID('dbo.MyTable') IS NOT NULL
PRINT 'MyTable Exists'
Else
PRINT 'MyTable Not Exists'with regards Karthik Harve
-
How to check whether a database has a table out of that database
try with this..
If Object_ID('dbo.MyTable') IS NOT NULL
PRINT 'MyTable Exists'
Else
PRINT 'MyTable Not Exists'with regards Karthik Harve
-
try with this..
If Object_ID('dbo.MyTable') IS NOT NULL
PRINT 'MyTable Exists'
Else
PRINT 'MyTable Not Exists'with regards Karthik Harve