alter proc spgridStates @CountryId int as begin select [StatesName ],country.[CountryName ] as Countries ,country.CountryId ,states.StateId from Country,States where Country.CountryId = @CountryId and States.CountryId = @CountryId union all select 'Total States',null,(select COUNT(*) from States where States.CountryId = @CountryId ),null States end
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)