MySQL单表查询
素材如下:
/*Table structure for table course
*/
DROP TABLE IF EXISTS course
;
CREATE TABLE course
(
cs_id
int(11) NOT NULL COMMENT ‘课程编号’,
cs_name
varchar(50) NOT NULL COMMENT ‘课程名称’,
cs_credit
tinyint(255) unsigned DEFAULT NULL COMMENT ‘课程学分’,
cs_type
char(12) DEFAULT NULL COMMENT ‘课程类别’,
cs_depart
char(6) DEFAULT NULL COMMENT ‘院系名称’,
PRIMARY KEY (cs_id
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table course
*/
insert into course
(cs_id
,cs_name
,cs_credit
,cs_type
,cs_depart
) values (5200313,‘数据库原理及应用’,4,‘核心专业’,‘信工’),(5203314,‘计算机导论’,4,‘通识教育’,‘信工’),(5219314,‘数据结构’,5,‘专业核心’,‘信工’),(5223013,‘大学物理’,4,‘专业基础’,‘信工’),(5227614,‘毕业实习’,4,