摘要: --递归查询 with cte as ( select a.ID,a.Text, a.Name,a.PID from Menu a where id='2' union all select k.id,k.Text, k.name,k.pid from ... 阅读全文
posted @ 2015-10-30 16:54 甜菜波波 阅读(250) 评论(0) 推荐(0) 编辑
摘要: select tid,tid+ coalesce(tid0,'101') from article where id=1 ---如果tid为null 则 返回101 select LEN('你好 啊') select datalength(N'abcd') ---返回字节数 ,N 占2字节sele... 阅读全文
posted @ 2015-10-30 13:49 甜菜波波 阅读(211) 评论(0) 推荐(0) 编辑