target.sql 659 B

12345678910111213141516171819202122232425262728293031323334353637
  1. create table asd;
  2. create table tb (col1 INT, col2 string, col3 FLOAT);
  3. create table tb1 (
  4. col1 int primary key,
  5. col2 FLOAT
  6. );
  7. create table tb2 (
  8. x int,
  9. y int,
  10. z int
  11. );
  12. SELECT Student.Sname
  13. FROM Student
  14. WHERE Sno IN (
  15. SELECT Sno
  16. FROM SC
  17. WHERE SC.Cno='81003'
  18. );
  19. select Student.Sname from Student join SC on Student.Sno=SC.Sno where SC.Cno='81003';
  20. select Student.Sname from Student join SC on Student.Sno=SC.Sno and SC.Cno='81003';
  21. insert into tb1 values (1, 'foo');
  22. insert into tb1 values (2, 'foo');
  23. update tb1 set col1=3 where col1=2;
  24. select * from tb1 where c1 > 1 and c2 = 'foo';
  25. delete from tb1 where c1 = 1;