尝试为数据库创建表后出现错误
这是我的剧本
CREATE TABLE `users` (
`id` int PRIMARY KEY NOT NULL AUTO_INCREMENT,
`user_role_id` int NOT NULL,
`first_name` varchar(250) NOT NULL,
`last_name` varchar(250) NOT NULL,
`name` varchar(250),
`email` varchar(250) NOT NULL,
`dni_type` varchar(32) NOT NULL,
`dni` int NOT NULL,
`phone` int,
`address` varchar(250),
`city` varchar(125),
`state` varchar(125),
`country` varchar(32),
`zip` varchar(32),
`created_at` datetime,
`created_by` int,
`updated_at` datetime,
`updated_by` int,
`deleted_at` datetime,
`deleted_by` int
);
我越来越
#1064 - Something is wrong in your syntax near 'CREATE TABLE `users` (
`id` int PRIMARY KEY NOT NULL AUTO_INCREMENT,
`u...' on line 2
为什么会产生该错误,将来如何避免该错误?
1条答案
按热度按时间yeotifhr1#
不要使用'