sql常用语句

时间:2015-05-20 14:41:55   收藏:0   阅读:210

得到一个表列的个数:select count(a.name) as count from syscolumns a where a.id=object_id(‘TB_B_PROJECTS‘)

修改列的长度: alter table [TB_B_PROJECTS] alter column [INTRODUCE] varchar(2048)

like排除: select distinct projectcode from prj_017 where PROJECTCODE not like‘P%‘ and PROJECTCODE not like‘S%‘ and PROJECTCODE not like‘ P%‘ and PROJECTCODE not like‘ S%‘

查看触发器跟表之间的关系:sp_depends ‘[Opportunity]‘

原文:http://www.cnblogs.com/toSeeMyDream/p/4517037.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!