Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account

MySQL create table

0

60 views

After reading the tutorials and examples on creating tables, I'm trying to create my own. But, the error this code gives me doesn't tell me what is wrong.

Can someone help?

CREATE TABLE feedback
(id INT NOT NULL AUTO_INCREMENT CREATE PRIMARY KEY,
email VARCHAR(80),
brand VARCHAR(30),
model VARCHAR(30),
desc VARCHAR(255),
date TIMESTAMP(8));

asked April 13, 2011 10:05 am CDT
posted via StackOverflow

3 Answers

3
 

You're doing the primary key declaration wrong, I believe. Leave off the word "create" and it should work.

answered April 13, 2011 10:23 am CDT
2
 

desc VARCHAR(255),

"desc" is a reserved keyword, It might the problem, use something else and try

Hope it helps

answered April 13, 2011 10:23 am CDT
0
 
CREATE TABLE  `feedback` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`email` VARCHAR(80),
`brand` VARCHAR(30),
`model` VARCHAR(30),
`descr` VARCHAR(255),
`date` TIMESTAMP
) 

answered April 13, 2011 10:23 am CDT

Your answer

Join with account you already have


Sign in with Twitter account
Sign in with Facebook account
Sign in with Google Friend Connect

Preview
Similar questions
Create table in hbase
February 22, 2011