随笔分类 -  SQL Server

SQL Server中巧用另类写法代替Like语句
摘要:提到Like语句大家都很熟悉,比如查找用户名包含有"c"的所有用户, 我们可以用 use mydatabase select * from table1 where username like'%c%" 以下是完成上面功能的另一种写法: use mydatabase select * from table1 where charindex('c',username)>0 这种方法... 阅读全文

posted @ 2008-06-28 12:22 HC 阅读(561) 评论(1) 推荐(0)

导航