Get current site URL

1

Please login or register to vote for this query.

(click on this box to dismiss)

Get the URL of SE site the query is run against. Please note: if you need to link a page from the currently selected site use the 'site://' protocol instead (check the following: http://meta.stackoverflow.com/q/127204/158912)

Emacs

Q&A for those using, extending or developing Emacs

DECLARE @site VARCHAR (500)
DECLARE @idx_exported INT, @idx_meta INT
SET @site = 'stackoverflow'
SET @idx_exported = PATINDEX('%.Exported', db_name())
SELECT @idx_exported

-- StackOverflow
-- SuperUser
-- ServerFault
-- StackApps

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results