简体   繁体   English

无法在MySQL 5.1.44中创建表

[英]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. 我正在尝试在MySQL 5.1.44中创建一个像这样的表,但是没有用。 It is giving a error number 1064 . 它给出错误号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: 您在AUTO INCREMENT有错字,请改用AUTO_INCREMENT

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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