Re: how to know the table is exist in the database
- From: "Miha Markic [MVP C#]" <miha at rthand com>
- Date: Tue, 25 Oct 2005 10:14:13 +0200
Hi Mark,
Actually, executing sp_tables stored procedure is better since sysobjects
structure or accesibility might change at some point.
--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
"Mark Rae" <mark@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:uWemvlT2FHA.3420@xxxxxxxxxxxxxxxxxxxxxxx
> "joy.net" <luxingyu1@xxxxxxxxxxx> wrote in message
> news:%23DX0hgT2FHA.3912@xxxxxxxxxxxxxxxxxxxxxxx
>
> Depends on the database and/or on the database access method...
>
> E.g. if you want to know if the Orders table exists in SQL Server, send it
> the following scalar query:
>
> SELECT COUNT(*) FROM sysobjects WHERE name = 'Orders'
>
> If the result is 1, the table exists - if the result is 0, the table
> doesn't exist.
>
.
- References:
- Re: how to know the table is exist in the database
- From: Mark Rae
- Re: how to know the table is exist in the database
- Prev by Date: Re: Newbie with Database Connection Problem
- Next by Date: Re: how to know the table is exist in the database
- Previous by thread: Re: how to know the table is exist in the database
- Next by thread: Re: how to know the table is exist in the database
- Index(es):
Relevant Pages
|
Loading