文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>sql学习7

sql学习7

时间:2010-09-26  来源:为你抒写

 use zhongfei

go select * from t_employee   select distinct 1 from t_employee CREATE TABLE T_TempEmployee (FIdCardNumber VARCHAR(20),FName VARCHAR(20),FAge INT, PRIMARY KEY (FIdCardNumber))   INSERT INTO T_TempEmployee(FIdCardNumber,FName,FAge) VALUES('1234567890121','Sarani',33); INSERT INTO T_TempEmployee(FIdCardNumber,FName,FAge) VALUES('1234567890122','Tom',26); INSERT INTO T_TempEmployee(FIdCardNumber,FName,FAge) VALUES('1234567890123','Yalaha',38); INSERT INTO T_TempEmployee(FIdCardNumber,FName,FAge) VALUES('1234567890124','Tina',26); INSERT INTO T_TempEmployee(FIdCardNumber,FName,FAge) VALUES('1234567890125','Konkaya',29); INSERT INTO T_TempEmployee(FIdCardNumber,FName,FAge) VALUES('1234567890126','Fo fa' ,46) ; select * from t_tempemployee   SELECT FNumber,FName,FAge FROM T_Employee UNION  SELECT FIdCardNumber,FName,FAge FROM T_TempEmployee   SELECT '正式员工最高年龄',MAX(FAge) FROM T_Employee UNION SELECT '正式员工最低年龄',MIN(FAge) FROM T_Employee UNION SELECT '临时工最高年龄',MAX(FAge) FROM T_TempEmployee UNION SELECT '临时工最低年龄',MIN(FAge) FROM T_TempEmployee     select fnumber,fsalary from t_employee union  select '工资合计',sum(fsalary) from t_employee   SELECT '以下是正式员工的姓名' UNION ALL SELECT FName FROM T_Employee UNION ALL SELECT '以下是临时工的姓名' UNION ALL SELECT FName FROM T_TempEmployee select * from t_debt select * from t_person use zhongfei go     /*在此,sql金典,我学了个皮毛,更高深的知识我都还没有学习,特此要学习加油大家*/  
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载