Free Newsletters:
DatabaseDaily
 

SQLCourse
Interactive Online SQL Training

Search Database Journal:

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


internet.commerce
Partner With Us















internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers




Become a Marketplace Partner




Inserting into a Table Answers

Your Insert statements should be similar to: (note: use your own table name that you created)

insert into 
  myemployees_ts0211
(firstname, lastname, 
 title, age, salary)
values ('Jonie', 'Weber', 
        'Secretary', 28, 
        19500.00);
  1. Select all columns for everyone in your employee table.

    select * from
    myemployees_ts0211
  2. Select all columns for everyone with a salary over 30000.

    select * from
    myemployees_ts0211
    where salary > 30000
  3. Select first and last names for everyone that's under 30 years old.

    select firstname, lastname
    from myemployees_ts0211
    where age < 30
  4. Select first name, last name, and salary for anyone with "Programmer" in their title.

    select firstname, lastname, salary
    from myemployees_ts0211
    where title LIKE '%Programmer%'
  5. Select all columns for everyone whose last name contains "ebe".

    select * from
    myemployees_ts0211
    where lastname LIKE '%ebe%'
  6. Select the first name for everyone whose first name equals "Potsy".

    select firstname from
    myemployees_ts0211
    where firstname = 'Potsy'
  7. Select all columns for everyone over 80 years old.

    select * from
    myemployees_ts0211
    where age > 80
  8. Select all columns for everyone whose last name ends in "ith".

    select * from
    myemployees_ts0211
    where lastname LIKE '%ith'

Back to Inserting into a table


SQL Course Curriculum
<<previous 1 2 3 4 5 6 7 8 9  next>>