Re: Create database if does not exist.
Try ... CREATE DATABASE /*!32312 IF NOT EXISTS*/ databasename; ... then try reading the manual! - Original Message - From: Radhakrishna Mohan Tadepalli [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 13, 2002 11:40 AM Subject: Create database if does not exist. I want to create a database test_db1, if test_db1 does not exist in the server using sql script. Is it possible? _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Create database if does not exist.
I want to create a database test_db1, if test_db1 does not exist in the server using sql script. Is it possible? _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Create database if does not exist.
On Wed, Mar 13, 2002 at 09:40:44AM -0800, Radhakrishna Mohan Tadepalli wrote: I want to create a database test_db1, if test_db1 does not exist in the server using sql script. Is it possible? From http://mysql.com/doc/C/R/CREATE_DATABASE.html 6.5.1 CREATE DATABASE Syntax CREATE DATABASE [IF NOT EXISTS] db_name CREATE DATABASE creates a database with the given name. Rules for allowable database names are given in section 6.1.2 Database, Table, Index, Column, and Alias Names. An error occurs if the database already exists and you didn't specify IF NOT EXISTS. Did you even check the on-line manual? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Brian 'you Bastard' Reichert[EMAIL PROTECTED] 37 Crystal Ave. #303Daytime number: (603) 434-6842 Derry NH 03038-1713 USA Intel architecture: the left-hand path - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php