随笔分类 -  SQL Server

摘要:kill all user in a database, 删除所有用户 阅读全文
posted @ 2009-12-08 17:28 helloworld22 阅读(285) 评论(0) 推荐(1)
摘要:ProblemAfter restoring DB in SQL Server 2005 db most of the time I get the following error:Database diagram support objects cannot be installed because this database does not have a valid owner. To co... 阅读全文
posted @ 2009-08-18 16:19 helloworld22 阅读(444) 评论(2) 推荐(0)
摘要:Declare @tblConnectedUsers Table ( SPID int ) Declare @vcSQLText varchar(200), @iSPID int --Get the currently connected users Insert into @tblC... 阅读全文
posted @ 2009-03-25 10:44 helloworld22 阅读(340) 评论(0) 推荐(0)
摘要:*/ ---------------------------------------------- declare @ID nvarchar(20); --定义变量来保存ID号 declare @DATE DATETIME; DECLARE @DFD NVARCHAR(200); --定义变量来保存值 SET @DFD=''; declare mycursor cursor ... 阅读全文
posted @ 2009-02-11 16:34 helloworld22 阅读(153) 评论(0) 推荐(0)
摘要:比如现在有一人员表 (表名:peosons) 若想将姓名、身份证号、住址这三个字段完全相同的记录查询出来 select p1.* from persons p1,persons p2 where p1.idp2.id and p1.cardid = p2.cardid and p1.pname = p2.pname and p... 阅读全文
posted @ 2009-02-11 16:33 helloworld22 阅读(413) 评论(0) 推荐(0)