Hassan Schroeder <[EMAIL PROTECTED]> wrote:
> Is there a problem with 'IF NOT EXISTS' in the following scenario?
> 
> This statement creates the table as expected ...
> 
> CREATE TEMPORARY TABLE IF NOT EXISTS
>        showcase (
>                  PRIMARY KEY (product)
>                  )
> SELECT product FROM productList
> 
> .. but re-running it (from the console or via page reload) results
> in  "ERROR 1062: Duplicate entry 'foo' for key 1"
> 
> I expected it to simply exit silently when it finds that the table
> *does* already exist. So what am I missing?  :-)

"Duplicate entry" means that you already have value 'foo' in the column 'product' 
which is defined as primary key.


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to