I need to insert a default value to my select statement So I am doing it in this fashion.
Is there any better way I can do this?
I need to insert "All" as my first row value to table Sitetbl select statement.
DECLARE @SiteValue TABLE
(
Id INT IDENTITY(1,1),
SiteID Nvarchar(15),
SiteName Nvarchar(100)
)
Insert into @SiteValue(SiteID,SiteName) values('All','All')
insert into @SiteValue(SiteID,SiteName)
SELECT DISTINCT SiteID,SiteName from Sitetbl
Ex: Result how I am looking
All All
St Singapore
IN India
CH China