又没有懂MYAQL的麻烦指点一下,有个问题,实在是找不到
-- 使用sql命令操作数据库:-- 建立tCourse表:
CREATE TABLE tCourse (
cno CHAR ( 5 ) NOT NULL PRIMARY KEY,
cname VARCHAR ( 50 ),
ctype VARCHAR ( 20 ) COMMENT '课程类型',
ccredit DECIMAL ( 2, 1 ) COMMENT '学分',
cperiod INT ( 2 ) COMMENT '学时',
ctno CHAR ( 7 ) COMMENT '任课教师编号'
) -- 向表中添加数据:insert
-- 方式一:仅添加一条记录
INSERT INTO tcourse ( cno, cname, ctype, ccredit, cperiod, ctno )
VALUES
( '34051', '数据库原理', '专业必修课', 3.5, 54, '2008011' );
错误::ctype VARCHAR ( 20 ) COMMENT '课程类型',
ccredit DECIMAL ( 2, 1 ) COMMENT '学分',
cperiod INT ( 2 ) COMMENT '学时',
ctno CHAR ( 7 ) COMMENT '任课教师编号'
) -- 向表中添加数据:insert
-- 方式一:仅添加一条记录
INSERT INTO tcourse ( cno, cname, ctype, ccredit, cperiod, ctno )
VALUES
( '34051', '数据库原理', '专业必修课', 3.5, 54, '2008011' )
> 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO tcourse ( cno, cname, ctype, ccredit, cperiod, ctno )
VALUES
( '340' at line 12
> 时间: 0s