-
Notifications
You must be signed in to change notification settings - Fork 0
/
Querys.sql
75 lines (62 loc) · 1.83 KB
/
Querys.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
CREATE DATABASE DEVPraticaDapperGeneric;
--INICIO - CRIAR TABELA Cliente
USE [DEVPraticaDapperGeneric]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Cliente](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[DataInclusao] [datetime] NOT NULL,
[Ativo] [bit] NOT NULL,
[Nome] [nvarchar](50) NOT NULL,
[DataNascimento] [datetime] NOT NULL,
CONSTRAINT [PK_Cliente] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
--FIM - CRIAR TABELA Cliente
--INICIO - CRIAR TABELA Fornecedor
USE [DEVPraticaDapperGeneric]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Fornecedor](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[DataInclusao] [datetime] NOT NULL,
[Ativo] [bit] NOT NULL,
[RazaoSocial] [nvarchar](50) NOT NULL,
[CNPJ] [nvarchar](18) NOT NULL,
CONSTRAINT [PK_Fornecedor] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
--FIM - CRIAR TABELA Fornecedor
--INICIO - CRIAR TABELA Usuario
USE [DEVPraticaDapperGeneric]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Usuario](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[DataInclusao] [datetime] NOT NULL,
[Ativo] [bit] NOT NULL,
[Nome] [nvarchar](50) NOT NULL,
[Email] [nvarchar](50) NULL,
[DataNascimento] [datetime] NOT NULL,
CONSTRAINT [PK_Usuario] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
--FIM - CRIAR TABELA Usuario