icabit

query

Jul 7th, 2012
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. update table name set colname = 'new data' where colname ='old date'
  2. insert into table name (colums) values ('','','','','') where blah2x
  3. select column name from tablename where blah
  4. Delete from table name where blah
  5. select street from Branch where branchno = (Select branchno from staff group by branchno having COUNT (branchno)!>1)
  6.  
  7. select branchno,(select count(staffno) as noofstaff from staff where branchno=branchno),
  8. (select avg(salary) as average from staff where branchno=branchno)from branch
  9.  
  10. B005 22 Dear Rd
  11. B007 16 Argyll St.
  12. B003 163 Main St.
  13. B004 32 Manse Rd.
  14. B002 56 Claver Dr.
  15.  
  16. staffno fname salary branchno
  17. SL21 John 30000 B005
  18. SL37 Ann 12000 B003
  19. SL14 David 18000 B003
  20. SA9 Mary 9000 B007
  21. SG5 Susan 24000 B003
  22. SL41 julie 9000 B005
Advertisement
Add Comment
Please, Sign In to add comment