分类【SQL】下的文章

SQL

按拼音排序:SELECT * from STUDENT ORDER BY NLSSORT(NAME, 'NLS_SORT=SCHINESE_PINYIN_M') 按部首顺序SELECT * from STUDENT ORDER BY NLSSORT(NAME, 'NLS_SORT=SCHINESE_RADICAL_M') 按笔画顺序SELECT * f...
SQL

oracle wm_concat(column)函数使我们经常会使用到的,下面就教您如何使用oraclewm_concat(column)函数实现字段合并如:shopping:u_id goods num1 苹果 22 梨子 ...
SQL

对于一些自表关联的表,想要查出一条记录和它的所有下属子级,可以用下面的语句:sqlserver: with my1 as(select * from aaa where id = 1 union all select aaa.* from my1, aaa where my1.id = aaa.pid ) select * from...
SQL

工作中遇到的数据更新,学习记录。1、使用update进行数据更新  1)最简单的更新  update tablea a set a.price=1.00  2)带条件的数据更新  update tablea a set a.price = 2.00 where a.id='02'  3)两张表关联更新为固定值  update tablea a se...