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
"Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. "
You are 3528 reader
since 1st April 2009
Yes | 66.7% |
2 |
No | 33.3% |
1 |