简体   繁体   中英

Unable to create a table in MySQL 5.1.44

I'm doing a website for a client who is an architect who has designed a few good looking buildings in the town. He wants a slider on the home page to showcase his best architecture. I had already integrated the hero slider. It is working fine.

He wants to be able to be able to change the pictures on the slide himself.

So I'm trying to put the slides into a table.

I'm trying to create a table like this in MySQL 5.1.44 but it is NOT taking. It is giving a error number 1064 . Please help -

CREATE TABLE slider (
slide_id INT UNSIGNED NOT NULL AUTO INCREMENT PRIMARY KEY,
building_name VARCHAR(100) NOT NULL,
building_loc VARCHAR(100) NOT NULL
)

You have typo in AUTO INCREMENT use AUTO_INCREMENT instead:

CREATE TABLE slider ( slide_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
                     building_name VARCHAR(100) NOT NULL,
                     building_loc VARCHAR(100) NOT NULL );

SqlFiddleDemo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM