Interactive Online SQL Training
HOME News MS SQL Oracle DB2 Access MySQL PHP SQL Etc Scripts Links Forums DBA Talk
SQL Courses
1What is SQL?
2Table basics
3Selecting data
4Creating tables
5Inserting into a table
6Updating records
7Deleting records
8Drop a table
9Advanced Queries
10Standalone SQL interpreter
11Advertise on SQLCourse.com
12Database Links
13Technology Jobs
Free Newsletters:

By submitting your information, you agree that sqlcourse.com may send you SQLCourse offers via email, phone and text message, as well as email offers about other products and services that SQLCourse believes may be of interest to you. SQLCourse will process your information in accordance with the Quinstreet Privacy Policy.


Selecting Data Answers

  1. Display everyone's first name and their age for everyone that's in table.

    select first, 
      from empinfo;
  2. Display the first name, last name, and city for everyone that's not from Payson.

    select first, 
      from empinfo
    where city <> 
  3. Display all columns for everyone that is over 40 years old.

    select * from empinfo
           where age > 40;
  4. Display the first and last names for everyone whose last name ends in an "ay".

    select first, last from empinfo
           where last LIKE '%ay';
  5. Display all columns for everyone whose first name equals "Mary".

    select * from empinfo
           where first = 'Mary';
  6. Display all columns for everyone whose first name contains "Mary".

    select * from empinfo
           where first LIKE '%Mary%';

Back to Selecting Data


SQL Course Curriculum
<<previous 123456789 next>>