use db
go
SELECT *
INTO MS0Countries6
FROM WAC.VWCCountries
ORDER BY CountryName asc
SELECT TOP (100) PERCENT CountryName, REPLACE(CountryName, ' ', '_') + N'.png' AS CountryFlagImage, CountryTaxName, CountryTaxRate, CountryActive
FROM WAM.MS0Countries
WHERE (CountryActive = 1)
ORDER BY CountryName
SELECT TOP 100 PERCENT *
INTO MS0Countries7
FROM WAC.VWCCountries
ORDER BY CountryName asc
Yeah this is one of those 'undocumented features' of SQL Server, which probably exists only to make passing certification exams more difficult.
If you want views to sort, you need to add TOP 100 PERCENT to the SELECT line.
Open in new window
>MSSQL Create Ordered Table from Sorted View
Not sure if you mean 'ordered return set' or 'ordered table'.
Tables are not intended to contain a specific sort order, so most experienced developers would question why you want this.