我在尝试在mySQL上运行此脚本时遇到语法错误,无法弄清楚它是什么错误。任何帮助,将不胜感激。 这是代码:
SHOW DATABASES;
DROP DATABASE IF EXISTS conman;
Create Database conman;
USE conman;
CREATE TABLE contact_info(
firstname varchar(25),
middleinitial char(1),
lastname varchar(25),
suffix_description varchar(5),
title_description varchar(5),
jobtitle varchar(40),
department varchar(30),
email varchar(35),
url varchar(50),
IMaddress varchar(25),
phone_number varchar(25),
phonetype_description varchar(10),
birthday date,
notes varchar(255),
companyname varchar(30),
addressLine1 varchar(40),
addressLine2 varchar(45),
city varchar(25),
state_province varchar(20),
zip_postalcode varchar(10),
country_region varchar(15),
companyURL varchar(45),
companyPhone varchar(12),
);
INSERT INTO contact_info
(
firstName,
middleInitial,
lastName,
suffixDescription,
titleDescription,
jobTitle,
department,
email,
url,
IMaddress,
phoneNumber,
phoneDescription,
birthday,
notes,
companyName,
addressLine1,
addressLine2,
city,
state_province,
zip_postalcode,
country_region,
companyURL,
companyPhone,
)
VALUES
(
'Jacob',
'P',
'Jacobson',
'Jr',
'Mr',
'Director',
'Finance',
'rjameson@concor.com',
'www.concor.com/~rjames',
'jpjacobson',
'323-546-6834',
'work',
'1969-07-13',
'All meetings must be scheduled through Charlene Renolds',
'Concor International, Inc.',
'143 South Main Street',
'',
'Los Angeles',
'CA',
'90012-3712',
'USA',
'www.concor.com',
'323-546-6834',
)
以下是错误消息:
错误1064(42000):您的SQL语法有错误;查看与您的MySQL服务器版本对应的手册,以获得正确的语法,以便在附近使用')'在第26行
错误1064(42000):您的SQL语法有错误;检查与您的MySQL服务器版本对应的手册,以便在#")附近使用正确的语法 VALUES ( '雅各&#39 ;, ' P&#39 ;, '雅各布森&#39 ;, ' JR&#39 ;, '先生&#39 ;, '主管&#39 ;, '金融&#39 ;, ' rjameso'在第26行
答案 0 :(得分:0)
删除每个CREATE TABLE,INSERT INTO和VALUES语句的最后一个逗号:
-1.#QNAN0