ExcelStore

Примеры команд SQL в рамках урока #16

Sep 21st, 2020
2,115
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Примеры команд SQL в рамках урока #16
  2.  
  3. SELECT * FROM KMV_CUSTOMERS;
  4.  
  5.  
  6. CREATE TABLE KMV_CUSTOMERS AS
  7. SELECT EMPLOYEE_ID, FIRST_NAME, LAST_NAME, HIRE_DATE
  8. FROM HR.EMPLOYEES
  9. WHERE EMPLOYEE_ID IN (100, 105, 110, 115, 120);
  10. commit;
  11.  
  12.  
  13. UPDATE KMV_CUSTOMERS
  14. SET HIRE_DATE = '01.01.1999'
  15. WHERE EMPLOYEE_ID = 105;
  16. commit;
  17.  
  18.  
  19. UPDATE KMV_CUSTOMERS
  20. SET FIRST_NAME = 'Иван',
  21.     LAST_NAME = 'Иванов'
  22. WHERE EMPLOYEE_ID = 105;
  23. commit;
  24.  
  25.  
  26. UPDATE KMV_CUSTOMERS
  27. SET FIRST_NAME = 'Иван',
  28.     LAST_NAME = 'Иванов'
  29. WHERE EMPLOYEE_ID IS NOT NULL;
  30. commit;
  31.  
  32.  
  33. DELETE FROM KMV_CUSTOMERS
  34. WHERE EMPLOYEE_ID = 105;
  35. commit;
  36.  
  37.  
  38. DELETE FROM KMV_CUSTOMERS
  39. WHERE EMPLOYEE_ID IS NOT NULL;
  40. commit;
  41.  
RAW Paste Data