sql
Lune2018
这个作者很懒,什么都没留下…
展开
-
sql语句中使用foreach
//Controller:把camera状态值不等于4的camera_id传回后台condMap.put("cameraIds", cameraIds); //XML文件:sql语句select * from t where t.id in <foreach collection="cameraIds" index="index" item="item" open=...原创 2018-07-16 18:00:34 · 3490 阅读 · 0 评论 -
单表sql查询省市县
select a2.area_id as parent_id, a2.area_name as parent_name, a1.area_id as child_id, a1.area_name as child_namefrom area as a1 left join area as a2 on a1.parent_id = a2.are...原创 2018-07-13 16:43:31 · 3767 阅读 · 0 评论 -
sql:复制数据到另一个表中
insert into table_a (name,address,longitude,latitude,area_id)(select name,address,longitude,latitude,area_id from table_b)原创 2018-07-16 17:58:30 · 168 阅读 · 0 评论