-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsqlDB.sql
63 lines (61 loc) · 4.09 KB
/
sqlDB.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
USE [ParkingManegment]
GO
/****** Object: Table [dbo].[__MigrationHistory] Script Date: 09/02/2020 10:35:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[__MigrationHistory](
[MigrationId] [nvarchar](150) NOT NULL,
[ContextKey] [nvarchar](300) NOT NULL,
[Model] [varbinary](max) NOT NULL,
[ProductVersion] [nvarchar](32) NOT NULL,
CONSTRAINT [PK_dbo.__MigrationHistory] PRIMARY KEY CLUSTERED
(
[MigrationId] ASC,
[ContextKey] 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] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[Vehicles] Script Date: 09/02/2020 10:35:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Vehicles](
[LicensePlateID] [bigint] NOT NULL,
[Name] [nvarchar](max) NOT NULL,
[PhoneNumber] [nvarchar](max) NOT NULL,
[VehicleType] [int] NOT NULL,
[TicketType] [int] NOT NULL,
[LotNumber] [int] NOT NULL,
[Length] [int] NOT NULL,
[Width] [int] NOT NULL,
[Height] [int] NOT NULL,
CONSTRAINT [PK_dbo.Vehicles] PRIMARY KEY CLUSTERED
(
[LicensePlateID] 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] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: StoredProcedure [dbo].[GetAllVehiclesByTicketType] Script Date: 09/02/2020 10:35:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[GetAllVehiclesByTicketType] @ticketType int
AS
SELECT * FROM dbo.Vehicles WHERE TicketType = @ticketType
GO
/****** Object: StoredProcedure [dbo].[GetAllVehiclesByTicketType2] Script Date: 09/02/2020 10:35:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[GetAllVehiclesByTicketType2]
@ticketType [int]
AS
BEGIN
SELECT * FROM dbo.Vehicles WHERE TicketType = @ticketType
END
GO