Skip to content

Commit 151fce4

Browse files
author
Azure Pipelines Bot
committed
[Linux / SQL Server 2019] baselines
1 parent a345fcc commit 151fce4

File tree

112 files changed

+5430
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+5430
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
-- SqlServer.2019
2+
DECLARE @Id BigInt -- Int64
3+
SET @Id = 1
4+
DECLARE @PermanentId UniqueIdentifier -- Guid
5+
SET @PermanentId = 'bc7b663d-0fde-4327-8f92-5d8cc3a11d11'
6+
DECLARE @Code NVarChar(4000) -- String
7+
SET @Code = N'C1'
8+
DECLARE @Name NVarChar(4000) -- String
9+
SET @Name = N'N1'
10+
DECLARE @IsDeleted Bit -- Boolean
11+
SET @IsDeleted = NULL
12+
13+
INSERT INTO [Subdivisions]
14+
(
15+
[Id],
16+
[PermanentId],
17+
[Code],
18+
[Name],
19+
[IsDeleted]
20+
)
21+
VALUES
22+
(
23+
@Id,
24+
@PermanentId,
25+
@Code,
26+
@Name,
27+
@IsDeleted
28+
)
29+
30+
SELECT SCOPE_IDENTITY()
31+
32+
33+
34+
-- SqlServer.2019
35+
DECLARE @Id BigInt -- Int64
36+
SET @Id = 2
37+
DECLARE @PermanentId UniqueIdentifier -- Guid
38+
SET @PermanentId = 'a948600d-de21-4f74-8ac2-9516b287076e'
39+
DECLARE @Code NVarChar(4000) -- String
40+
SET @Code = N'C2'
41+
DECLARE @Name NVarChar(4000) -- String
42+
SET @Name = N'N2'
43+
DECLARE @IsDeleted Bit -- Boolean
44+
SET @IsDeleted = NULL
45+
46+
INSERT INTO [Subdivisions]
47+
(
48+
[Id],
49+
[PermanentId],
50+
[Code],
51+
[Name],
52+
[IsDeleted]
53+
)
54+
VALUES
55+
(
56+
@Id,
57+
@PermanentId,
58+
@Code,
59+
@Name,
60+
@IsDeleted
61+
)
62+
63+
SELECT SCOPE_IDENTITY()
64+
65+
66+
67+
-- SqlServer.2019
68+
DECLARE @Id BigInt -- Int64
69+
SET @Id = 3
70+
DECLARE @PermanentId UniqueIdentifier -- Guid
71+
SET @PermanentId = 'bd3973a5-4323-4dd8-9f4f-df9f93e2a627'
72+
DECLARE @Code NVarChar(4000) -- String
73+
SET @Code = N'C3'
74+
DECLARE @Name NVarChar(4000) -- String
75+
SET @Name = N'N3'
76+
DECLARE @IsDeleted Bit -- Boolean
77+
SET @IsDeleted = NULL
78+
79+
INSERT INTO [Subdivisions]
80+
(
81+
[Id],
82+
[PermanentId],
83+
[Code],
84+
[Name],
85+
[IsDeleted]
86+
)
87+
VALUES
88+
(
89+
@Id,
90+
@PermanentId,
91+
@Code,
92+
@Name,
93+
@IsDeleted
94+
)
95+
96+
SELECT SCOPE_IDENTITY()
97+
98+
99+
100+
SELECT [s].[Id], [s].[Code], [s].[IsDeleted], [s].[Name], [s].[PermanentId]
101+
FROM [Subdivisions] AS [s]
102+
WHERE CAST([s].[Id] AS bigint) = CAST(1 AS bigint)
103+
104+
105+
-- SqlServer.2019
106+
107+
SELECT
108+
[s].[Id],
109+
[s].[PermanentId],
110+
[s].[Code],
111+
[s].[Name],
112+
[s].[IsDeleted]
113+
FROM
114+
[Subdivisions] [s]
115+
WHERE
116+
CAST([s].[Id] AS BigInt) = 1
117+
118+
119+
120+
-- SqlServer.2019
121+
DECLARE @id BigInt -- Int64
122+
SET @id = 1
123+
124+
SELECT
125+
[s].[Id],
126+
[s].[PermanentId],
127+
[s].[Code],
128+
[s].[Name],
129+
[s].[IsDeleted]
130+
FROM
131+
[Subdivisions] [s]
132+
WHERE
133+
[s].[Id] = @id
134+
135+
136+
137+
-- SqlServer.2019
138+
139+
SELECT
140+
[s].[Id],
141+
[s].[PermanentId],
142+
[s].[Code],
143+
[s].[Name],
144+
[s].[IsDeleted]
145+
FROM
146+
[Subdivisions] [s]
147+
WHERE
148+
[s].[Id] IN (2, 3)
149+
150+
151+
152+
-- SqlServer.2019
153+
154+
SELECT
155+
[t1].[Id],
156+
[t1].[PermanentId],
157+
[t1].[Code],
158+
[t1].[Name],
159+
[t1].[IsDeleted]
160+
FROM
161+
[Subdivisions] [t1]
162+
163+
164+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
-- SqlServer.2019
2+
3+
SELECT
4+
[t1].[Id],
5+
[t1].[Name]
6+
FROM
7+
[Issue261Table] [t1]
8+
9+
10+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
-- SqlServer.2019
2+
3+
CREATE TABLE [tempdb]..[#Issue4657TempTable1]
4+
(
5+
[Id] Int NOT NULL,
6+
[Code] Int NOT NULL
7+
)
8+
9+
10+
11+
INSERT BULK [tempdb]..[#Issue4657TempTable1](Id, Code)
12+
13+
14+
15+
-- SqlServer.2019
16+
17+
CREATE TABLE [tempdb]..[#Issue4657TempTable2]
18+
(
19+
[Id] Int NOT NULL,
20+
[Code] Int NOT NULL
21+
)
22+
23+
24+
25+
INSERT BULK [tempdb]..[#Issue4657TempTable2](Id, Code)
26+
27+
28+
29+
-- SqlServer.2019
30+
31+
WITH [CTE_1] ([Id], [Code])
32+
AS
33+
(
34+
SELECT
35+
[t1].[ID],
36+
[t1].[CODE]
37+
FROM
38+
[Issue4657Table] [t1]
39+
)
40+
MERGE INTO [CTE_1] [Target]
41+
USING (
42+
SELECT
43+
[t2].[Id],
44+
[t2].[Code]
45+
FROM
46+
[tempdb]..[#Issue4657TempTable1] [t2]
47+
) [Source]
48+
(
49+
[Id],
50+
[Code]
51+
)
52+
ON ([Target].[Id] = [Source].[Id])
53+
54+
WHEN NOT MATCHED THEN
55+
INSERT
56+
(
57+
[Code]
58+
)
59+
VALUES
60+
(
61+
[Source].[Code]
62+
)
63+
OUTPUT
64+
INSERTED.[Id],
65+
INSERTED.[Code]
66+
INTO [tempdb]..[#Issue4657TempTable2]
67+
(
68+
[Id],
69+
[Code]
70+
)
71+
;
72+
73+
74+
75+
-- SqlServer.2019
76+
77+
DROP TABLE IF EXISTS [tempdb]..[#Issue4657TempTable2]
78+
79+
80+
81+
-- SqlServer.2019
82+
83+
DROP TABLE IF EXISTS [tempdb]..[#Issue4657TempTable1]
84+
85+
86+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
SELECT [w].[Id], [w].[Value]
2+
FROM [WithDuplicateProperties] AS [w]
3+
WHERE [w].[Value] = 1
4+
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
-- SqlServer.2019
2+
3+
CREATE TABLE [tempdb]..[#NoIdentity]
4+
(
5+
[Id] uniqueidentifier NOT NULL,
6+
[Name] nvarchar(max) NOT NULL,
7+
8+
PRIMARY KEY CLUSTERED ([Id])
9+
)
10+
11+
12+
13+
INSERT BULK [tempdb]..[#NoIdentity](Id, Name)
14+
15+
16+
17+
-- SqlServer.2019
18+
19+
SELECT
20+
[t1].[Id],
21+
[t1].[Name]
22+
FROM
23+
[tempdb]..[#NoIdentity] [t1]
24+
25+
26+
27+
-- SqlServer.2019
28+
29+
DROP TABLE IF EXISTS [tempdb]..[#NoIdentity]
30+
31+
32+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
-- SqlServer.2019
2+
3+
CREATE TABLE [tempdb]..[#WithIdentity]
4+
(
5+
[Id] int NOT NULL IDENTITY,
6+
[Name] nvarchar(max) NOT NULL,
7+
8+
PRIMARY KEY CLUSTERED ([Id])
9+
)
10+
11+
12+
13+
INSERT BULK [tempdb]..[#WithIdentity](Name)
14+
15+
16+
17+
-- SqlServer.2019
18+
19+
SELECT
20+
[t1].[Id],
21+
[t1].[Name]
22+
FROM
23+
[tempdb]..[#WithIdentity] [t1]
24+
25+
26+
27+
-- SqlServer.2019
28+
29+
DROP TABLE IF EXISTS [tempdb]..[#WithIdentity]
30+
31+
32+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Parameters:
2+
@p0='?' (Size = 21), @p1='?' (Size = 21), @p2='?' (Size = 21), @p3='?' (Size = 21), @p4='?' (Size = 21)
3+
4+
SET IMPLICIT_TRANSACTIONS OFF;
5+
SET NOCOUNT ON;
6+
MERGE [WithInheritance] USING (
7+
VALUES (@p0, 0),
8+
(@p1, 1),
9+
(@p2, 2),
10+
(@p3, 3),
11+
(@p4, 4)) AS i ([Discriminator], _Position) ON 1=0
12+
WHEN NOT MATCHED THEN
13+
INSERT ([Discriminator])
14+
VALUES (i.[Discriminator])
15+
OUTPUT INSERTED.[Id], i._Position;
16+
17+
18+
-- SqlServer.2019
19+
20+
SELECT
21+
[t1].[Discriminator],
22+
[t1].[Id]
23+
FROM
24+
[WithInheritance] [t1]
25+
WHERE
26+
[t1].[Discriminator] IN (N'WithInheritanceA2', N'WithInheritanceA1', N'WithInheritanceA')
27+
28+
29+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
-- SqlServer.2019
2+
3+
CREATE TABLE [tempdb]..[#NoIdentity]
4+
(
5+
[Id] uniqueidentifier NOT NULL,
6+
[Name] nvarchar(max) NOT NULL,
7+
8+
PRIMARY KEY CLUSTERED ([Id])
9+
)
10+
11+
12+
13+
INSERT ASYNC BULK [tempdb]..[#NoIdentity](Id, Name)
14+
15+
16+
17+
-- SqlServer.2019
18+
19+
SELECT
20+
[t1].[Id],
21+
[t1].[Name]
22+
FROM
23+
[tempdb]..[#NoIdentity] [t1]
24+
25+
26+
27+
-- SqlServer.2019
28+
29+
DROP TABLE IF EXISTS [tempdb]..[#NoIdentity]
30+
31+
32+

0 commit comments

Comments
 (0)