Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/5

Click to flip

5 Cards in this Set

  • Front
  • Back
Define Order by statement
Used to sort the selected results.

Format:
Select column_name
From table name
Order by column_name
How to sort the company name in alphabetical order?
Select company_name
From table name
Order by company_name
How to sort the company name in reverse alphabetical order?
Select company_name
From table name
Order by company_name desc
How to sort the company name in alphabetical order and order number in numerical order?
A. This one will sort the company name in alphabetical order first and then sort the order number within the same company name in alphabetical order.

Select company_name, order number
From table name
Order by company_name, order number;

B. This one will sort the order number in numerical order (ie ascending order) first and then sort the same company name in alphabetical order
How to sort order number in numerical order?
Select order number
From table name
Order by order number

(Note: if not specify, it will sort by ascending; to sort by descending, need to put desc at the end of Order by statement)