Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Xiplus
.
Toggle Highlighting
SQL
CREATE FUNCTION `nsname`(@ns INT) RETURNS VARCHAR(255) BEGIN SET @nsnamestr = "" case when @ns = 0 then SET @nsnamestr = "" when @ns = 1 then SET @nsnamestr = "Talk:" when @ns = 2 then SET @nsnamestr = "User:" when @ns = 3 then SET @nsnamestr = "User talk:" when @ns = 4 then SET @nsnamestr = "Wikpeida:" when @ns = 5 then SET @nsnamestr = "Wikpeida talk:" when @ns = 6 then SET @nsnamestr = "File:" when @ns = 7 then SET @nsnamestr = "File talk:" when @ns = 8 then SET @nsnamestr = "Mediawiki:" when @ns = 9 then SET @nsnamestr = "Mediawiki talk:" when @ns = 10 then SET @nsnamestr = "Template:" when @ns = 11 then SET @nsnamestr = "Template talk:" when @ns = 12 then SET @nsnamestr = "Help:" when @ns = 13 then SET @nsnamestr = "Help talk:" when @ns = 14 then SET @nsnamestr = "Category:" when @ns = 15 then SET @nsnamestr = "Category talk:" when @ns = 100 then SET @nsnamestr = "Portal:" when @ns = 101 then SET @nsnamestr = "Portal talk:" when @ns = 118 then SET @nsnamestr = "Draft:" when @ns = 119 then SET @nsnamestr = "Draft talk:" when @ns = 828 then SET @nsnamestr = "Module:" when @ns = 829 then SET @nsnamestr = "Module talk:" end RETURN @nsnamestr END SELECT nsname(1)
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...