SQL - where and order clause together
When you run a SELECT query without any sorting options, the SQL server returns the records in an indiscriminate order. In most cases, the SQL server returns records in the same order they are added to the database. There is no guarantee that records are returned in a specific order when you don't use sorting options in SQL. In addition to sorting, you also use filtering options to return only specific records that match your requirements. Sorting Your Records SQL uses the ORDER BY statement to sort records. You can sort records in ascending or descending order, and you can sort records based on multiple columns. SQL lets you sort alphabetically, numerically or chronologically. For instance, suppose you want to get a list of your customers, and you need the list in alphabetical order by state. The following is your current list of customers. CustomerId First_name Last_name City State 321 Frank Loe Dallas TX 455 Ed Thompson Atlanta GA 456 Ed Thompson Atlanta GA 4...