摘要:有很多不需要安装。根据自己的需求来,vs2008同理!
阅读全文
随笔分类 - sql server
摘要:要使objectId数量最多的排在最前面 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->select objectId,count(*) as statisticNum from statistic group by objectId order ...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> update sacLogin set companyName= room.roomType from saclogin,room where room.port = sacLogin.port ...
阅读全文
摘要:declare @date datetime
select @date = ArtPassDate from QsqArticle where artId = @artId
阅读全文
摘要: if not exists (select * from QsqPageContent where ObjectID=@ObjectID and ShowType=@ShowType)
阅读全文
摘要:三、技巧
1、1=1,1=2的使用,在SQL语句组合时用的较多
"where 1=1" 是表示选择全部 "where 1=2"全部不选,
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->ifexists(select*fromdbo.sysobjectswhereid=object_id(N'[dbo].[UP_forums_CodeScheduleType_...
阅读全文
摘要:还原数据库的时候一定要选对还原路径,以前还原的时候常忘记 还原好了数据库之后,发现日志文件很大,占了好几g,这时可以采用收缩日志文件,将其内容全部清空。 方法:首先》在查询分析器中执行DUMP TRANSACTION 库名 WITH NO_LOG 然后》在企业管理器中》数据库右键》所有任务》收缩数据库》文件》数据库文件(选择要收缩的文件),收缩文件至(这个不用管它)》确定 ...
阅读全文
摘要:数据库中“时间”,“整数”查询不能模糊查询,只能用“” 例如:
select * from expert where beginTime = #2008-9-9# and beginTime #2008-9-10#
阅读全文
摘要:在写数据库命令语句时,我们经常会建一个测试表来试验自己写的语句是否正确,这里可以建一个临时表,用完之后自动删除很方便。顺便也学学临时表的用法。 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->create table #test ( id in...
阅读全文
摘要:case when then代替if else和传多个参数
insert 后直接写select将查询出来的记录添加进去
阅读全文

浙公网安备 33010602011771号