SQL技巧

  1. 使用exists:if exists(select 1 from Table1 where Name = 'xxx') {} else {}
  2. 把NULL排在后面:order by isnull(beginTime), beginTime
posted @ 2013-09-01 00:14  Leung文  阅读(112)  评论(0编辑  收藏  举报