MySQL Forums
Forum List  »  Connector/ODBC

Re: Database table
Posted by: Hemant Dangi
Date: September 30, 2013 02:06AM

Hello Eugene,

Thanks for showing interest in MySQL and its products.

Please post issues in their respective forums. This issue should be in General or PHP forums.
http://forums.mysql.com/list.php?20
http://forums.mysql.com/list.php?52


There are multiple errors in this query because of
1. multiple double quotes,
2. NOT NULL alone without column name,
3. space in identifier name without quote (backtick '`').

Please use below query:

CREATE TABLE IF NOT EXISTS OPD (
`pid` INT(11) NOT NULL AUTO_INCREMENT,
`first Name` VARCHAR(16) NOT NULL,
`last Name` VARCHAR(16) NOT NULL,
`dob` DATETIME NOT NULL,
`gender` ENUM('m','f') NOT NULL,
`email` VARCHAR(255) NOT NULL,
`age` INT(2) NOT NULL,
`address` VARCHAR(255) NOT NULL,
`city` VARCHAR(255) NOT NULL,
`category` ENUM('A','B','C','Student','Employee') NOT NULL DEFAULT 'A',
`mobile` INT(11) NOT NULL,
`ref id` INT(11) NULL,
`payment Type` ENUM('Cash','Cheque','Online','DD') NOT NULL DEFAULT 'Cash',
`time Slot` DATETIME NOT NULL,
`center` VARCHAR(255) NOT NULL,
`treatment` VARCHAR(255) NOT NULL,
`appointment` DATETIME NOT NULL,
`docterCode` ENUM('1','2','3') NOT NULL,
`ip` VARCHAR(255) NOT NULL,
`signup` DATETIME NOT NULL,
`lastlogin` DATETIME NOT NULL,
PRIMARY KEY (pid)
)


Thanks.

Options: ReplyQuote


Subject
Written By
Posted
September 26, 2013 11:10PM
Re: Database table
September 30, 2013 02:06AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.