Sql
EJames
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
SQL行列转换
select * from v_temp;/*上面的视图结果如下:user_name role_name---------------------------系统管理员 管理员 feng 管理员 feng原创 2011-09-03 12:28:31 · 443 阅读 · 0 评论 -
精妙的SQL
精妙的SQL语句 说明:复制表(只复制结构,源表名:a 新表名:b) select * into b from a where 1说明:拷贝表(拷贝数据,源表名:a 目标表名:b)insert into b(a, b, c) select d,e,f from原创 2011-09-03 12:23:16 · 370 阅读 · 0 评论 -
mysql select in
select in在mssql和mysql下的差别:mssql:select * from upfiles where id in( SELECT picture FROM msg where id=77 );SELECT picture FROM msg where id=77 结果为:'12,11,10,4'select * from upfiles where i原创 2012-01-20 15:00:59 · 1633 阅读 · 0 评论 -
近日处理shopex商品时用到的一些SQL语句
近日处理shopex商品时用到的一些SQL语句一、shopex 编号/货号批量修改编号 字段是 `sdb_goods` 表的`bn`货号 字段是 `sdb_products` 表的`bn`操作时只需将表名更改就可。读取指定格式货号的商品,如:select * from `sdb_products` where bn like 'S%'替换其中某个固定格式原创 2012-02-19 14:03:29 · 1205 阅读 · 0 评论 -
找出存在于一张表而又不存在于另外一种表的记录
表结构:表Aid name remark1 a 582 b 523 c 234 c 445 d 246 d 45表Bid name 1 a 2 b方法一:--查询语句SELECT id,name FROM AEXCEPT转载 2012-03-11 14:06:45 · 1030 阅读 · 0 评论
分享