Click to See Complete Forum and Search --> : [RESOLVED] MySql Create Table


Theone2k
March 27th, 2007, 01:48 PM
Hi i'm new to SQL this mite sound daft but how do i check for a table and if it doesn't exists create it?

Im using MySql 4.1

and connecting to the sever from my own program.

Theone2k
March 27th, 2007, 02:10 PM
Ah dont know what was going on last night but code now seems to work. was getting errors befor :) the code farys must have fixed it for me

'CREATE TABLE IF NOT EXISTS Members
(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
data VARCHAR(100))'

:D well thanks for all the help im sure i would have got :D