"Ben" <[EMAIL PROTECTED]> wrote:

>Perhaps when I'm checking for table existance using mysql through
>python I have to be more explicit:
>
>Where I did have:
>USE database;
>IF NOT EXISTS CREATE table(.....
>
>Perhaps I need:
>USE database;
>IF NOT EXISTS CREATE database.table(.....
>
>I'll try it after lunch. Does anyoone know whether this might be the
>problem?

The "IF NOT EXISTS" clauses are not standard SQL; they are MySQL
extensions.  Although my reasons are nebulous and more related to principle
than to practicality, I try never to use them, because they might not be
available in my next database.

After all, you should have a pretty good idea at any given time whether
your database and table already exist.

I do occasionally allow myself a "DROP TABLE IF NOT EXISTS", which then
allows the unadulterated "CREATE TABLE" command.
-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to