there is always something to develop
How to test table existance
If You want to create table unless it already exists You just need to check then INFORMATION_SCHEMA.TABLES view. For example:
IF db_name()<>'master' and not exists (select * from INFORMATION_SCHEMA.TABLES where table_name='Dict' and table_type='BASE TABLE') BEGIN create table Dict ( Id bigint Identity(1,1) not null, Name varchar(32) not null default '', Item varchar(32) not null default '' ) end;
See also
Comments
"There are two kinds of failures. Those who think and never do, and those who do and never think."
You are 3526 reader
since 1st April 2009
Yes | 66.7% |
2 |
No | 33.3% |
1 |