Created
January 25, 2019 09:13
-
-
Save johanrex/b6b501dfb29c65fd90b3033989acf509 to your computer and use it in GitHub Desktop.
sql server exact string match
This file contains 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
DECLARE @nrRows INT; | |
SET @nrRows=1000000; | |
--drop table if exists tmp; | |
create table tmp | |
( | |
idString varchar(36) | |
); | |
WITH guidRows ( n ) AS ( | |
SELECT 1 UNION ALL | |
SELECT 1 + n FROM guidRows WHERE n < @nrRows ) | |
insert into tmp | |
select | |
convert(varchar(36), NEWID()) as idString | |
FROM | |
guidRows | |
OPTION ( MAXRECURSION 0 ) | |
SET STATISTICS XML ON; | |
select * from tmp where idString = 'kalleanka' | |
SET STATISTICS XML OFF; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment