mysql第四篇:数据操作之多表查询 一.多表联合查询 #创建部门 CREATE TABLE IF NOT EXISTS dept ( did int not null auto_increment PRIMARY KEY, dname VARCHAR() not null COMMENT '部门名称' )ENGINE=INNODB DEFAULT charset utf8; #添加部门数据 INSERT INTO `dept` VALUES (', '教学部'); INSERT INTO `d
一.select的简单用法 1.简单的数据检索 SELECT * FROM T_Employee; 2.检索出需要的列 SELECT FNumber,FName,FAge FROM T_Employee 3.列别名 SELECT FNumber AS Number1,FName AS Name,FAge AS Age,FSalary AS Salary FROM T_Employee 4.按条件过滤 SELECT FName FROM T_Employee WHERE FSalary<5000