dbTalk Databases Forums  

DROP TABLE name IF EXISTS

comp.databases.mysql comp.databases.mysql


Discuss DROP TABLE name IF EXISTS in the comp.databases.mysql forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
CJ
 
Posts: n/a

Default DROP TABLE name IF EXISTS - 01-10-2008 , 09:10 AM






What standard defines the "IF EXISTS" clause of the DROP TABLE or
CREATE TABLE syntax?

Sorry if this if off topic, asked out of curiosity as to why it is not
widely available in various SQL variants.

cj

Reply With Quote
  #2  
Old   
Kees Nuyt
 
Posts: n/a

Default Re: DROP TABLE name IF EXISTS - 01-10-2008 , 09:54 AM






On Thu, 10 Jan 2008 06:10:17 -0800 (PST), CJ
<spambox1 (AT) mindspring (DOT) com> wrote:

Quote:
What standard defines the "IF EXISTS" clause of the DROP TABLE or
CREATE TABLE syntax?

Sorry if this if off topic, asked out of curiosity as to why it is not
widely available in various SQL variants.
The SQL92 and SQL99 standards don't define it.

HTH
--
( Kees
)
c[_] I distinctly remember forgetting that. (#155)


Reply With Quote
  #3  
Old   
Kees Nuyt
 
Posts: n/a

Default Re: DROP TABLE name IF EXISTS - 01-10-2008 , 10:05 AM



On Thu, 10 Jan 2008 06:10:17 -0800 (PST), CJ
<spambox1 (AT) mindspring (DOT) com> wrote:

Quote:
What standard defines the "IF EXISTS" clause of the DROP TABLE or
CREATE TABLE syntax?

Sorry if this if off topic, asked out of curiosity as to why it is not
widely available in various SQL variants.

cj
Also not in SQL2003
http://savage.net.au/SQL/
--
( Kees
)
c[_] I distinctly remember forgetting that. (#155)


Reply With Quote
  #4  
Old   
CJ
 
Posts: n/a

Default Re: DROP TABLE name IF EXISTS - 01-10-2008 , 10:33 AM



On Jan 10, 10:05 am, Kees Nuyt <k.n... (AT) nospam (DOT) demon.nl> wrote:
Quote:
On Thu, 10 Jan 2008 06:10:17 -0800 (PST), CJ

spamb... (AT) mindspring (DOT) com> wrote:
What standard defines the "IF EXISTS" clause of the DROP TABLE or
CREATE TABLE syntax?

Sorry if this if off topic, asked out of curiosity as to why it is not
widely available in various SQL variants.

cj

Also not in SQL2003http://savage.net.au/SQL/
--
( Kees
)
c[_] I distinctly remember forgetting that. (#155)
Thanks to all, but I am looking to find out if any standard defines
this SQL syntax, or if this is simply a construct of mysql. I can
find no standard defining such syntax, which begs the question "why?"

It seems a very straight forward and useful syntax to have been simply
overlooked by ANSI. Was it expressly excluded by ANSI?

cj


Reply With Quote
  #5  
Old   
Michael Austin
 
Posts: n/a

Default Re: DROP TABLE name IF EXISTS - 01-12-2008 , 11:26 AM



CJ wrote:
Quote:
On Jan 10, 10:05 am, Kees Nuyt <k.n... (AT) nospam (DOT) demon.nl> wrote:
On Thu, 10 Jan 2008 06:10:17 -0800 (PST), CJ

spamb... (AT) mindspring (DOT) com> wrote:
What standard defines the "IF EXISTS" clause of the DROP TABLE or
CREATE TABLE syntax?
Sorry if this if off topic, asked out of curiosity as to why it is not
widely available in various SQL variants.
cj
Also not in SQL2003http://savage.net.au/SQL/
--
( Kees
)
c[_] I distinctly remember forgetting that. (#155)

Thanks to all, but I am looking to find out if any standard defines
this SQL syntax, or if this is simply a construct of mysql. I can
find no standard defining such syntax, which begs the question "why?"

It seems a very straight forward and useful syntax to have been simply
overlooked by ANSI. Was it expressly excluded by ANSI?

cj

I believe you are confusing ANSI standard with Oracle Standard. At the
time Oracle introduced MANY syntactical changes they were not a part of
of the ANSI standard. To answer your "why" ??... because each db
product can do what ever they like when defining the syntax to be used
on their platform - They can be
< ANSI standard ! MYSQL, ???
ONLY ANSI standard ! don't know any off hand...
ANSI standard + ! Oracle, DB2, Rdb, Sybase to name a few.

MYSQL is < ANSI standard due the way some of their data types do not
return data properly. [Search the bug database for CHAR.]


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.