A meta post gives a nice snippet of SQL
declare @search nvarchar(max) = ##searchfor:string?carefully %listen##
select id [Post Link]
, score
, creationdate
, lastactivitydate
, closeddate
, owneruserid as [User Link]
from posts
where body like concat('%', @search, '%') collate SQL_Latin1_General_CP1_CI_AI
or title like concat('%', @search, '%') collate SQL_Latin1_General_CP1_CI_AI
What does double number sign ## mean in there?
I guess that is some kind of string syntax, but I cannot even guess a keyword for that. googling "number sign ## in SQL" returns "prefix temporary tables", which is not the case.
Best Answer
##
surrounds a query parameter in the Stack Exchange Data Explorer (SEDE).The portion after the
?
is the displayed default parameter value.From the SEDE Tutorial written by Monica Cellio:
##
has no meaning in standard SQL. Though not the case here, it is used in Transact-SQL as a prefix to identify a global temporary object: