Difference between revisions of "CREATE TABLE problems: Table already exists."
From SQLZOO
(Created page with "CREATE TABLE problems: Table already exists. <div class='ht'> <div class=params>schema:scott</div> <div> When developing table definitions it may be useful to precede a sequ...") |
|||
| (One intermediate revision by one user not shown) | |||
| Line 3: | Line 3: | ||
<div class=params>schema:scott</div> | <div class=params>schema:scott</div> | ||
<div> | <div> | ||
| − | When developing table definitions it may be useful to precede | + | When developing table definitions it may be useful to precede a sequence of CREATE TABLE statements with the corresponding DROP TABLE statements in the reverse order (see next tip). |
| − | + | ||
| − | + | ||
</div> | </div> | ||
| Line 13: | Line 11: | ||
<source lang='sql' class='def'>CREATE TABLE t_holiday (a INTEGER) | <source lang='sql' class='def'>CREATE TABLE t_holiday (a INTEGER) | ||
</source> | </source> | ||
| − | <source lang='sql' class='def'>CREATE TABLE IF NOT EXISTS | + | <source lang='sql' class='def e-mysql'>CREATE TABLE IF NOT EXISTS |
t_holiday(a INTEGER) | t_holiday(a INTEGER) | ||
</source> | </source> | ||
Latest revision as of 10:27, 17 July 2012
CREATE TABLE problems: Table already exists.
schema:scott
When developing table definitions it may be useful to precede a sequence of CREATE TABLE statements with the corresponding DROP TABLE statements in the reverse order (see next tip).
CREATE TABLE t_holiday (a INTEGER)
CREATE TABLE IF NOT EXISTS t_holiday(a INTEGER)
CREATE TABLE problems: Table already exists.