Advertisement
Guest User

Untitled

a guest
Sep 4th, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE TABLE MES_t (x NUMBER(3), s VARCHAR2(50));
  2.  
  3. INSERT INTO MES_t VALUES (1, 'asd');
  4. INSERT INTO MES_t VALUES (2, 'qwe');
  5. INSERT INTO MES_t VALUES (3, 'zxc');
  6.  
  7. COMMIT
  8.  
  9. UPDATE MES_t
  10. SET s = 'qwe', x = 100
  11. WHERE s = 'asd';
  12.  
  13. COMMIT
  14.  
  15. SELECT * FROM MES_t WHERE x < 10;
  16.  
  17. SELECT s, SUM(x) FROM MES_t GROUP BY s;
  18.  
  19. DELETE FROM MES_t WHERE x < 10;
  20.  
  21. COMMIT
  22.  
  23. DROP TABLE MES_t
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement