summaryrefslogtreecommitdiff
path: root/tests/unit/Data/SqlMap/scripts/mssql/category-init.sql
blob: d7a7cfa5165c4f383ebc1a079ec1e4e43551d5b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- Creating Table

use [IBatisNet]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Categories]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Categories]

CREATE TABLE [dbo].[Categories] (
	[Category_Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Category_Name] [varchar] (32)  NULL,
	[Category_Guid] [uniqueidentifier] NULL  
) ON [PRIMARY]

-- Store procedure

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ps_InsertCategorie]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[ps_InsertCategorie]