摘要: 可以先在SQL写一个函数:CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->CREATEFUNCTION[dbo].[ExclusionAccount](@Accountnvarchar(30))RETURNSbitASBEGINDECLARE@ResultbitIF@AccountIN('administrator','admin','system','sys',' 阅读全文
posted @ 2009-03-09 19:41 Insus.NET 阅读(679) 评论(1) 推荐(2) 编辑
摘要: SQL循环插入记录,需要用到WHILE来实现,比如要插入L1至L50到表中。CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->DECLARE@iintSET@i=1WHILE@i<44BEGININSERTINTO[ProductionLines]([ProductionLinesName])VALUES('L'+CONVERT(nvarchar,@i))SET@i=@i+1END如果需要插入如下数据,MA001至 阅读全文
posted @ 2009-03-09 18:20 Insus.NET 阅读(1844) 评论(0) 推荐(1) 编辑