dbms2.docx

Post on 17-Feb-2016

212 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

SET d

sid sname rating age22 Dustin 7 45.029 Brutus 1 33.031 Lubber 8 55.532 Andy 8 25.558 Rusty 10 35.064 Horatio 7 35.071 Zorba 10 16.074 Horatio 9 40.085 Art 3 25.595 Bob 3 63.5Sailors table S Reserves table R

bid bname color101 Interlak

eBlue

102 Interlake

Red

103 Clipper Green104 Marine redBoats table B

Write SQL Query for the following:

(1) Find the age of all sailors.(2) Find all sailors with a rating below 7.(3) Find the name of sailors who have reserved boat number 104.(4) Find the name of sailors whose name end with y .

sid bid day22 101 10/10/9822 102 10/10/9822 103 10/8/9822 104 10/7/9831 102 11/10/9831 103 11/6/9831 104 11/12/9864 101 9/5/9864 102 9/8/9874 103 9/8/98

top related