![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Mysql
文章平均质量分 73
xiangyunxue
这个作者很懒,什么都没留下…
展开
-
两张结构不同的表,从一张表导入数据到另外一张表
//插入应用INSERT INTO EquipmentApply(ApplyPlat, ApplyID1, ApplyPerson, ApplyManager, ApplyUseto,ApplyInOutTypeID,ApplyRemark, ApplyDate, ApplyInputPerson)SELECT 10 AS ApplyPlat, ApplyMyID AS Apply转载 2013-10-04 22:24:12 · 1086 阅读 · 0 评论 -
sql 语句
关于选了5门不同的课程:考虑的因素:1、缩小范围 (缩小范围的办法有 特殊关联查询 1、在select 后 2.在from 后)select s.stuName from student s ,(select cs2.stuId,cs2.courseId from core cs2 group by cs2.courseId,cs2.stuId ) awhere s.stuId =原创 2012-11-23 00:15:43 · 238 阅读 · 0 评论 -
数据库时间函数
好久没碰时间函数了。jintiaselect '20至30' as '年龄段', count(*) as '人数' from test.tb t where TIMESTAMPDIFF(year,t.birthday,now()) >=20 and TIMESTAMPDIFF(year,t.birthday,now()) union all select '3原创 2014-07-10 17:50:18 · 964 阅读 · 0 评论