Created
April 29, 2011 09:17
-
-
Save max-mulawa/948088 to your computer and use it in GitHub Desktop.
Table Variable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE DatabaseWithPolishCollation | |
GO | |
IF OBJECT_ID('TestCollaction','U') IS NOT NULL | |
DROP TABLE TestCollaction | |
CREATE TABLE TestCollaction | |
( | |
Id Int PRIMARY KEY, | |
Name VARCHAR(20) NOT NULL, | |
NameUnicode NVARCHAR(20) NOT NULL | |
) | |
DECLARE @TestCollaction3 TABLE | |
( | |
Id Int PRIMARY KEY, | |
Name VARCHAR(20) NOT NULL, | |
NameUnicode NVARCHAR(20) NOT NULL | |
) | |
INSERT INTO TestCollaction(Id, Name, NameUnicode) | |
SELECT 1, 'Test 1', N'Test 1 Unicode' | |
UNION ALL | |
SELECT 2, 'Test 2', N'Test 2 Unicode' | |
INSERT INTO @TestCollaction3(Id, Name, NameUnicode) | |
SELECT 1, 'Test 1', N'Test 1 Unicode' | |
UNION ALL | |
SELECT 2, 'Test 2', N'Test 2 Unicode' | |
SELECT * | |
FROM TestCollaction tc | |
INNER JOIN @TestCollaction3 tc3 | |
ON tc.NameUnicode = tc3.NameUnicode | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment