Last active
December 12, 2015 01:29
-
-
Save olivier-spinelli/4691651 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
-- This can be executed (star comments may occur between name parts). | |
create view [dbo]/*C1*/./*C2*/vTest | |
as | |
select * from sys.tables; | |
GO | |
-- The view is correctly created... | |
select * from dbo.vTest; | |
select * from dbo/*C*/./*C*/vTest; | |
GO | |
-- But... this is what is generated :-). | |
create view [dbo].[vTest]/*C1*/./*C2*/vTest | |
as | |
select * from sys.tables; | |
GO | |
-- Even if it seems that the content has been correctly stored. | |
exec sp_helptext 'dbo.vTest' | |
-- outputs: | |
-- create view [dbo]/*C1*/./*C2*/vTest | |
-- as | |
-- select * from sys.tables; |
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
select * from [AdventureWorks2012]/*C1*/ | |
./*C2*/[HumanResources] -- C3 | |
/*C4*/./*C5*/ [Department]; | |
select ₣ /*Comment*/ -35; |
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
select [yes! | |
a quoted indentifier, | |
can span multiple lines... | |
Horrible isn't it? | |
:-(] = 'Oumpf...'; | |
select "yes! | |
a quoted indentifier, | |
can span multiple lines... | |
Horrible isn't it? | |
:-(" = 'And with double quotes'; | |
select " " = 'one space'; | |
select " | |
" = 'new line...'; | |
select "[]" = 'bracket inside.'; | |
select "[[[[[[[]" = 'brackets inside.'; | |
select [""] = 'quote inside.'; | |
select "a "" inside..." = 'double quote inside :-)'; | |
select [and [double]] inside...] = 'double ] is also supported!'; | |
-- Two identical tokens... | |
create table dbo.tTest | |
( | |
[int] [int] null | |
); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment