随笔分类 -  SQL 语句

SQL
摘要:代码如下: use DB go select table1.*,b.OPTime from [dbo].[table1] left join( select * from (select table2.*,ROW_NUMBER() over(partition by ArchivesID or... 阅读全文
posted @ 2014-11-12 09:51 情若天_RunUp 阅读(1360) 评论(0) 推荐(0)
摘要:代码: SET IDENTITY_INSERT表名 ON SET IDENTITY_INSERT表名 OFF 阅读全文
posted @ 2014-11-11 16:51 情若天_RunUp 阅读(367) 评论(0) 推荐(0)
摘要:1 declare @Id uniqueidentifier 2 declare @UserId uniqueidentifier 3 declare @DepartmentName nvarchar(128) 4 declare @DepartmentId uniqueidentifier 5 ... 阅读全文
posted @ 2014-11-10 09:49 情若天_RunUp 阅读(228) 评论(0) 推荐(0)