myuan 2 rokov pred
rodič
commit
f17661799e
1 zmenil súbory, kde vykonal 37 pridanie a 0 odobranie
  1. 37 0
      target.sql

+ 37 - 0
target.sql

@@ -0,0 +1,37 @@
+create table asd();
+
+create table tb (col1, col2);
+
+create table tb1 (
+    col1 int primary key, 
+    col2 string
+);
+
+create table tb2 (
+    x int,
+    y int,
+    z int
+);
+
+SELECT Student.Sname
+FROM Student
+WHERE Sno IN (
+    SELECT Sno
+    FROM SC 
+    WHERE SC.Cno='81003'
+);
+
+select Student.Sname from Student join SC on Student.Sno=SC.Sno where SC.Cno='81003';
+
+select Student.Sname from Student join SC on Student.Sno=SC.Sno and SC.Cno='81003';
+
+insert into tb1 values (1, 'foo');
+
+insert into tb1 values (2, 'foo');
+
+update tb1 set col1=3 where col1=2;
+
+select * from tb1 where c1 > 1 and c2 = 'foo';
+
+delete from tb1 where c1 = 1;
+