Thursday, March 29, 2007

Display the first name and age for everyone that's in the table.
select first,age from empinfo;

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

Display all columns for everyone that is over 40 years old.
select first,last,id,age,city,state from empinfo;
where age >= 40


Display the first and last names for everyone whose last name ends in an "ay".
select first,last from empinfo
where last like "%ay"

Display all columns for everyone whose first name equals "Mary".
select first,last,id,age,city,state from empinfo;
where first = "Mary"
Display all columns for everyone whose first name contains "Mary".
select first from empinfo;
where first like "%Mary%"

3 comments:

Itsjustablog said...

http://img387.imageshack.us/my.php?image=gunzy4.jpg

Itsjustablog said...

http://img410.imageshack.us/img410/6651/doorfh1.jpg

Itsjustablog said...

http://img395.imageshack.us/img395/4927/dooror6.jpg