我是学生,这是家庭作业…表格在那里,但没有插入数据。
感谢您的任何建议
Msg 156, Level 15, State 1, Line 181
Incorrect syntax near the keyword 'INSERT'.
SQL语句:
USE Mort;
Go
INSERT INTO
Employee
(Last_name,
First_name,
Address,
City,
State,
Telephone_area_code,
Telephone_number,
Job_title,
Hire_date,
Wage,
Gender,
Race,
Age)
VALUES
('McNamara',
'Juanita',
'923 Parkway',
'La Jolla',
'CA',
'619',
'555-0208',
'Accounting Clerk',
'10/07/2003',
'$12.75',
'F',
'Hispanic',
32);
INSERT INTO
Employee
(Last_name,
First_name,
Address,
City,
State,
Telephone_area_code,
Telephone_number,
Job_title,
Hire_date,
Wage,
Gender,
Race,
Age)
VALUES
('Stephens',
'Harvey',
'7863 High Bluff Drive',
'La Jolla',
'CA',
'619',
'555-0123',
'Dir. of Fin.
& Acct.',
'3/1/1998',
'$75,000.00',
'M',
'Caucasian',
51);
INSERT INTO
Employee
(Last_name,
First_name,
Address,
City,
State,
Telephone_area_code,
Telephone_number,
Job_title,
Hire_date,
Wage,
Gender,
Race,
Age)
VALUES
('Vu',
'Matthew',
'981 Torrey Pines Road',
'La Jolla',
'CA',
'619',
'555-0138',
'Computer Support Specialist',
'8/16/2000',
'$18.50',
'M',
'Asian',
26);
INSERT INTO
Employee
(Last_name,
First_name,
Address,
City,
State,
Telephone_area_code,
Telephone_number,
Job_title,
Hire_date,
Wage,
Gender,
Race,
Age)
VALUES
('Nguyen',
'Meredith',
'10583 Arenas ST. ',
'La Jolla ',
'CA',
'619',
'555-0102',
'Computer Support Specialist ',
'9/27/1998 ',
'$21.50 ',
'M',
'Caucasian',
25);
INSERT INTO
Employee
(Last_name,
First_name,
Address,
City,
State,
Telephone_area_code,
Telephone_number,
Job_title,
Hire_date,
Wage,
Gender,
Race,
Age)
VALUES
('Avery',
'Ledonna',
'198 Governor Dr.',
'Del Mar',
'CA',
'619',
'555-0135',
'Asst. - Bakery & Pastry',
'3/28/2003',
'$10.50',
'F',
'African American',
23);
INSERT INTO
Employee
(Last_name,
First_name,
Address,
City,
State,
Telephone_area_code,
Telephone_number,
Job_title,
Hire_date,
Wage,
Gender,
Race,
Age)
INSERT INTO
Employee
(Last_name,
First_name,
Address,
City,
State,
Telephone_area_code,
Telephone_number,
Job_title,
Hire_date,
Wage,
Gender,
Race,
Age)
VALUES
('Drohos',
'Craig',
' ',
'Selano Beach',
'CA',
'619',
'555-0202',
'Assistant Manager',
'6/15/2000',
'$51,000.00 ',
'M',
'Caucasian',
32);
INSERT INTO
Employee
(Last_name,
First_name,
Address,
City,
State,
Telephone_area_code,
Telephone_number,
Job_title,
Hire_date,
Wage,
Gender,
Race,
Age)
VALUES
('Meier',
'Elaine',
'9703 Orchid Lane',
'Del Mar',
'CA',
'858',
'555-0112',
'Cashier',
'9/10/2000',
'$10.25',
'F',
'Asian',
51);
INSERT INTO
Employee
(Last_name,
First_name,
Address,
City,
State,
Telephone_area_code,
Telephone_number,
Job_title,
Hire_date,
Wage,
Gender,
Race,
Age)
VALUES
('Quillian',
'Stanley',
'98542 Wandering Road Apt 2-B',
'Del Mar',
'CA',
'760',
'555-0198',
'Asst. - Butchers & Seafood Specialists',
'12/16/1999',
'$11.50 ',
'M',
'American Indian',
29);
INSERT INTO
Employee
(Last_name,
First_name,
Address,
City,
State,
Telephone_area_code,
Telephone_number,
Job_title,
Hire_date,
Wage,
Gender,
Race,
Age)
VALUES
('Tyink',
'Thomas',
'87592 Pacific Heights Blvd.',
'Del Mar',
'CA',
'858',
'555-0159',
'Asst. - Bakery & Pastry',
'5/1/2001',
'$9.50',
'M',
'African American',
32);
INSERT INTO
Employee
(Last_name,
First_name,
Address,
City,
State,
Telephone_area_code,
Telephone_number,
Job_title,
Hire_date,
Wage,
Gender,
Race,
Age)
VALUES
('Vance',
'Brent',
'927 Cynthia Lane Parkway',
'Del Mar',
'CA',
'858',
'555-0147',
'Bagger - 30 hours/wk',
'3/29/2001',
'$6.75',
'M',
'Caucasian',
22);
您INSERT INTO Employee...
在其中没有VALUES
子句(“ Ledonna”之后的子句)
请注意,如果您双击Management Studio中的错误消息,它将带您进入代码的问题位。
问题内容: 我已经浏览了其他几个此类问题,但没有找到一个可以帮助我解决此问题的问题。我想做的是:我想为所有员工创建一个表,以分配将在其他多个表中使用的表。那张桌子和其他桌子工作正常。当我尝试基于该表创建新表时,就会出现我的问题,这样我就可以仅基于特定类型的员工来调出信息。在所有三个表的语句上,我得到此错误: ‘(’附近的语法不正确。期望的ID。 我一直在搜索如何解决它,但是我没有尝试过。我想念什么
问题内容: 您好,我试图弄清楚为什么在MSSQL中将兼容模式从80切换为100会破坏下面的功能? 这是我的功能: 问题答案: 尝试在with前面加一个半冒号: 给这篇文章读明白,为什么你需要做到这一点。尖刺: 但是,如果CTE不是批处理中的第一条语句,则必须在WITH关键字之前加上分号。作为一种最佳实践,我宁愿在所有CTE前面加上分号,以使这种一致的方法比记住我是否需要分号更容易。 就个人而言,我
问题内容: 我有一个Java代码: 然后我有SQLException: 您的SQL语法有误;检查与您的MySQL服务器版本相对应的手册,以在’?’附近使用正确的语法。 问题答案: 您应该执行不带任何参数的,如下所示: 使用参数调用将按原样执行提供的查询(没有绑定参数)。
我不熟悉SQL和visual studio等,但我改变了一些不允许我登录应用程序的内容。每当我按下登录按钮时,就会出现此错误 关键字“from”附近的语法不正确 这就是源头所在;
堆栈跟踪: [SqlException(0x80131904):关键字“from”附近语法不正确。] System.Data.sqlclient.sqlConnection.onerror(SqlException exception,Boolean breakConnection,Action`1 wrapCloseInAction)+1791910 System.Data.sqlClient.