News

I want to set up a stored procedure where the data is ordered by column according to user input, i.e.GetSomeData(@SearchPhrase varchar(80), @SortCode int) ASSELECT Field1, Field2, Field3 FROM tbl ...
Fortunately, SQL offers a number of clauses and operators for sorting, grouping, and summarizing. The following tips will help you discern when to sort, when to group, and when and how to summarize.