-
-
Save LitKnd/7227dbd122e1141c46e0864d400879e6 to your computer and use it in GitHub Desktop.
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
/***************************************************************************** | |
Copyright (c) 2018 SQL Workbooks LLC | |
Terms of Use: https://sqlworkbooks.com/terms-of-service/ | |
Contact: help@sqlworkbooks.com | |
*****************************************************************************/ | |
--How many rows will this return? | |
SELECT * | |
FROM | |
(VALUES | |
('corgis'), | |
('have'), | |
('100%'), | |
('more'), | |
('sploot!') | |
) as t(col1) | |
WHERE | |
col1 like '%'; | |
GO | |
--How many rows will this return? | |
SELECT * | |
FROM | |
(VALUES | |
('corgis'), | |
('have'), | |
('100%'), | |
('more'), | |
('sploot!') | |
) as t(col1) | |
WHERE | |
col1 like '%' ESCAPE '!'; | |
GO | |
--How many rows will this return? | |
SELECT * | |
FROM | |
(VALUES | |
('corgis'), | |
('have'), | |
('100%'), | |
('more'), | |
('sploot!') | |
) as t(col1) | |
WHERE | |
col1 like '%!%' ESCAPE '!'; | |
GO | |
--How many rows will this return? | |
SELECT * | |
FROM | |
(VALUES | |
('corgis'), | |
('have'), | |
('100%'), | |
('more'), | |
('sploot!') | |
) as t(col1) | |
WHERE | |
col1 like '!%' ESCAPE '!'; | |
GO | |
--How many rows will this return? | |
SELECT * | |
FROM | |
(VALUES | |
('corgis'), | |
('have'), | |
('100%'), | |
('more'), | |
('sploot!') | |
) as t(col1) | |
WHERE | |
col1 like '100!%' ESCAPE '!'; | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment