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 nsname = "" case when @ns = 0 then SET nsname = "" when @ns = 1 then SET nsname = "Talk:" when @ns = 2 then SET nsname = "User:" when @ns = 3 then SET nsname = "User talk:" when @ns = 4 then SET nsname = "Wikpeida:" when @ns = 5 then SET nsname = "Wikpeida talk:" when @ns = 6 then SET nsname = "File:" when @ns = 7 then SET nsname = "File talk:" when @ns = 8 then SET nsname = "Mediawiki:" when @ns = 9 then SET nsname = "Mediawiki talk:" when @ns = 10 then SET nsname = "Template:" when @ns = 11 then SET nsname = "Template talk:" when @ns = 12 then SET nsname = "Help:" when @ns = 13 then SET nsname = "Help talk:" when @ns = 14 then SET nsname = "Category:" when @ns = 15 then SET nsname = "Category talk:" when @ns = 100 then SET nsname = "Portal:" when @ns = 101 then SET nsname = "Portal talk:" when @ns = 118 then SET nsname = "Draft:" when @ns = 119 then SET nsname = "Draft talk:" when @ns = 828 then SET nsname = "Module:" when @ns = 829 then SET nsname = "Module talk:" end RETURN nsname 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...