码迷,mamicode.com
首页 > 其他好文 > 详细

存储过程

时间:2017-12-07 15:21:01      阅读:35      评论:0      收藏:0      [点我收藏+]

标签:detail   过程   end   实践   rip   created   parent   nts   show   

USE [GTAQZHPJK]
GO
/****** Object:  StoredProcedure [dbo].[SP_InitWebSite]    Script Date: 12/07/2017 10:13:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[SP_InitWebSite] 
    @SiteId INT  --站点ID
AS
BEGIN
    
    DECLARE @NewColumnId INT;
    DECLARE @NewModelId INT;
    

        BEGIN
            
            
            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N课程介绍, NULL, 100,0, @SiteId, 1, 1, 0, GETDATE());
                SET @NewColumnId = @@IDENTITY;
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N专业介绍, @NewColumnId, 110, 0, @SiteId, 1, 1, 0, GETDATE(),1);
                 SET @NewModelId = @@IDENTITY;
                 INSERT [WebAreas] ( [Name],[ShowName],[EnglishName],[FrontSettingId],[PageSize],[HasColumnTwo],[Type], [OrderIndex],[ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N专业介绍,专业介绍, Professional introduction,0,1,0,0,110, @NewModelId, @SiteId, 0, GETDATE());
                 
                 INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N课程特色, @NewColumnId, 120, 0, @SiteId, 1, 1, 0, GETDATE(),0);
                  SET @NewModelId = @@IDENTITY;
                 INSERT [WebAreas] ( [Name],[ShowName],[EnglishName],[FrontSettingId],[PageSize],[HasColumnTwo],[Type], [OrderIndex],[ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N课程特色,课程特色, Course characteristics,0,1,0,0,210, @NewModelId, @SiteId, 0, GETDATE());
             
             
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N课程简介, @NewColumnId, 130, 0, @SiteId, 1, 1, 0, GETDATE(),0);
                 SET @NewModelId = @@IDENTITY;
                 INSERT [WebAreas] ( [Name],[ShowName],[EnglishName],[FrontSettingId],[PageSize],[HasColumnTwo],[Type], [OrderIndex],[ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N课程简介,课程简介, ‘‘,0,1,0,0,120, @NewModelId, @SiteId, 0, GETDATE());
                 
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N教学大纲, @NewColumnId, 140, 0, @SiteId, 1, 1, 0, GETDATE(),0);
                 SET @NewModelId = @@IDENTITY;
                 INSERT [WebAreas] ( [Name],[ShowName],[EnglishName],[FrontSettingId],[PageSize],[HasColumnTwo],[Type], [OrderIndex],[ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N教学大纲,教学大纲, ‘‘,0,1,0,0,130, @NewModelId, @SiteId, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N课程标准, @NewColumnId, 150, 0, @SiteId, 1, 1, 0, GETDATE(),0);
              SET @NewModelId = @@IDENTITY;
                 INSERT [WebAreas] ( [Name],[ShowName],[EnglishName],[FrontSettingId],[PageSize],[HasColumnTwo],[Type], [OrderIndex],[ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N课程标准,课程标准, ‘‘,0,1,0,0,140, @NewModelId, @SiteId, 0, GETDATE());
             
             
             INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N教学师资, NULL, 200,0, @SiteId, 1, 1, 0, GETDATE(),1);
                SET @NewColumnId = @@IDENTITY;
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N课程负责人, @NewColumnId, 210, 0, @SiteId, 5, 5, 0, GETDATE(),0);
                SET @NewModelId = @@IDENTITY;
                 INSERT [WebAreas] ( [Name],[ShowName],[EnglishName],[FrontSettingId],[PageSize],[HasColumnTwo],[Type], [OrderIndex],[ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N课程负责人,课程负责人, ‘‘,0,1,0,0,200, @NewModelId, @SiteId, 0, GETDATE());
             
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N教师风采, @NewColumnId, 220, 0, @SiteId, 5, 5, 0, GETDATE(),0);
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N教师简介, @NewColumnId, 230, 0, @SiteId, 1, 1, 0, GETDATE(),0);
             
             INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N教学内容, NULL, 300,0, @SiteId, 1, 1, 0, GETDATE(),1);
                SET @NewColumnId = @@IDENTITY;
                
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N电子教案, @NewColumnId, 310, 0, @SiteId, 1, 2, 0, GETDATE(),0);
                 SET @NewModelId = @@IDENTITY;
                 INSERT [WebAreas] ( [Name],[ShowName],[EnglishName],[FrontSettingId],[PageSize],[HasColumnTwo],[Type], [OrderIndex],[ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N电子教案,电子教案, ‘‘,0,1,0,0,150, @NewModelId, @SiteId, 0, GETDATE());
                
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N课堂习题, @NewColumnId, 320, 0, @SiteId, 1, 2, 0, GETDATE(),0);
                 SET @NewModelId = @@IDENTITY;
                 INSERT [WebAreas] ( [Name],[ShowName],[EnglishName],[FrontSettingId],[PageSize],[HasColumnTwo],[Type], [OrderIndex],[ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N课堂习题,课堂习题, ‘‘,0,1,0,0,160, @NewModelId, @SiteId, 0, GETDATE());
                
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N教学课件, @NewColumnId, 330, 0, @SiteId, 1, 3, 0, GETDATE(),0);
                
                 SET @NewModelId = @@IDENTITY;
                 INSERT [WebAreas] ( [Name],[ShowName],[EnglishName],[FrontSettingId],[PageSize],[HasColumnTwo],[Type], [OrderIndex],[ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N教学课件,教学课件, ‘‘,0,1,0,0,170, @NewModelId, @SiteId, 0, GETDATE());
                
            
             INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N教学视频, NULL, 400,0, @SiteId, 1, 1, 0, GETDATE());
                SET @NewColumnId = @@IDENTITY;
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N教学动画, @NewColumnId, 410, 0, @SiteId, 2, 2, 0, GETDATE(),1);
                 SET @NewModelId = @@IDENTITY;
                 INSERT [WebAreas] ([Name], [ShowName],[FrontSettingId],[PageSize],[HasColumnTwo],[Type], [OrderIndex],[ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N教学动画, 教学动画,0,3,0,0,220, @NewModelId, @SiteId, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N教学视频, @NewColumnId, 420, 0, @SiteId, 2, 2, 0, GETDATE(),1);
                  SET @NewModelId = @@IDENTITY;
                  INSERT [WebAreas] ([Name], [ShowName],[EnglishName],[FrontSettingId],[PageSize],[HasColumnTwo],[Type], [OrderIndex],[ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N教学视频, 教学视频,flash,0,3,0,0,230, @NewModelId, @SiteId, 0, GETDATE());
                 
            INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N实践展示, NULL, 500,0, @SiteId, 1, 1, 0, GETDATE());
                SET @NewColumnId = @@IDENTITY;
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N实训指导, @NewColumnId, 510, 0, @SiteId, 2, 3, 0, GETDATE(),0);
                SET @NewModelId = @@IDENTITY;
                  INSERT [WebAreas] ([Name], [ShowName],[EnglishName],[FrontSettingId],[PageSize],[HasColumnTwo],[Type], [OrderIndex],[ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N实训指导, 实训指导,flash,0,1,0,0,180, @NewModelId, @SiteId, 0, GETDATE());
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N实践展示, @NewColumnId, 520, 0, @SiteId, 2, 4, 0, GETDATE(),0);
                     
                 
          INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N教研教改, NULL, 600,0, @SiteId, 1, 1, 0, GETDATE());
                SET @NewColumnId = @@IDENTITY;
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N教学方法, @NewColumnId, 610, 0, @SiteId, 4, 4, 0, GETDATE(),1);
                 SET @NewModelId = @@IDENTITY;
                  INSERT [WebAreas] ([Name], [ShowName],[EnglishName],[FrontSettingId],[PageSize],[HasColumnTwo],[Type], [OrderIndex],[ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N教学方法, 教学方法,‘‘,0,1,0,0,190, @NewModelId, @SiteId, 0, GETDATE());
                 
         INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N教学展示, NULL, 700,0, @SiteId, 1, 1, 0, GETDATE());
                SET @NewColumnId = @@IDENTITY;
                INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate],[IsIndexShow]) VALUES (N教学展示, @NewColumnId, 710, 0, @SiteId, 2, 4, 0, GETDATE(),1);
                  SET @NewModelId = @@IDENTITY;
                  INSERT [WebAreas] ([Name], [ShowName],[EnglishName],[FrontSettingId],[PageSize],[HasColumnTwo],[Type], [OrderIndex],[ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N教学展示, 教学展示,‘‘,0,3,0,0,100, @NewModelId, @SiteId, 0, GETDATE());
                  
        INSERT [Columns] ([Name], [ParentId], [OrderIndex], [IsHidden], [WebSiteId], [Type], [DetailType], [IsDeleted], [CreateDate]) VALUES (N教学成果, @NewColumnId, 720,0, @SiteId, 2, 4, 0, GETDATE());
                SET @NewModelId = @@IDENTITY;
                  INSERT [WebAreas] ([Name], [ShowName],[EnglishName],[FrontSettingId],[PageSize],[HasColumnTwo],[Type], [OrderIndex],[ColumnId], [WebSiteId], [IsDeleted], [CreateDate]) VALUES (N教学成果, 教学成果,Teaching achievements,0,100,0,0,240, @NewModelId, @SiteId, 0, GETDATE());




    
    
    
END
END

 

存储过程

标签:detail   过程   end   实践   rip   created   parent   nts   show   

原文地址:http://www.cnblogs.com/zyq-dan/p/7998602.html

(0)
(0)
   
举报
评论 一句话评论(0
0条  
登录后才能评论!
© 2014 mamicode.com 版权所有 京ICP备13008772号-2
迷上了代码!