![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sql
codeHH
这个作者很懒,什么都没留下…
展开
-
mysql sql server oracle 都表关联更新
sql serverupdate a set name=b.name, remark=b.remark from mytable a inner join mytableB b on a.id = b.id也可update a set name=b.name, remark=b.remark from mytable a, mytableB b where原创 2013-12-31 15:21:04 · 723 阅读 · 0 评论 -
Mysql rownum 实现(极度推荐)
Mysql rownum 实现(极度推荐)SELECT @rownum:=@rownum+1 AS rownum, frutas.*FROM (SELECT @rownum:=0) r, frutas;转载 2014-04-01 12:52:28 · 26913 阅读 · 1 评论 -
sql 转 汉字
--方法一sqlserver汉字转拼音首字母--调用方法 select dbo.procGetPY ('中國')Create FUNCTION dbo.procGetPY ( @str NVARCHAR(4000) ) /*select dbo. procGetPYFirstLetter ('中國')*/RETURNS NVARCHAR(4000) --WI转载 2016-08-23 20:26:45 · 1350 阅读 · 0 评论 -
数据去重复
select * from table t where not exists (select 1 from table where userid=t.userid and submit_time > submit_time) mysqlselect * from sns_user_profile t where type=1 and id not in( selec原创 2013-12-30 12:15:48 · 697 阅读 · 0 评论