Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
SQL help...check if a database and table already exists?
Can anyone please tell me how to write my code so that I can whether or not if a database and table exists, and if so dont create it again, simply insert the values?
php and sql
3 Answers
- Anonymous1 decade ago
if ur using mysql..then if u try 2 repeat a db or a table..it will automatically prompt a msg saying Db already exists...
- ?Lv 44 years ago
once you're making use of Microsoft sq. Server (T-sq.): -- // IF table would not EXIST, CREATE table IF not EXISTS (decide on table_name FROM information_schema.tables the place table_name = '[table call]') initiate CREATE table [table call] ( [table definition] ) end -- INSERT VALUES INSERT INTO [table call] ( [table column definition] ) decide on [values]