ExcelStore

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

Oct 21st, 2020 (edited)
1,242
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Примеры команд SQL в рамках урока #19
  2.  
  3.  
  4. SELECT
  5.     a.EMPLOYEE_ID, a.FIRST_NAME, a.LAST_NAME, a.DEPARTMENT_ID, b.DEPARTMENT_NAME
  6. FROM
  7.     EMPLOYEES a
  8.     LEFT OUTER JOIN DEPARTMENTS_2 b ON a.DEPARTMENT_ID = b.DEPARTMENT_ID
  9. WHERE
  10.     a.EMPLOYEE_ID = '109'
  11. ;
  12.  
  13.  
  14. SELECT
  15.     a.EMPLOYEE_ID, a.FIRST_NAME, a.LAST_NAME, a.DEPARTMENT_ID, b.DEPARTMENT_NAME
  16. FROM
  17.     EMPLOYEES a
  18.     RIGHT OUTER JOIN DEPARTMENTS_2 b ON a.DEPARTMENT_ID = b.DEPARTMENT_ID
  19. WHERE
  20.     a.EMPLOYEE_ID = '109'
  21. ;
  22.  
  23.  
  24. SELECT
  25.     a.EMPLOYEE_ID, a.FIRST_NAME, a.LAST_NAME, a.DEPARTMENT_ID, b.DEPARTMENT_NAME
  26. FROM
  27.     EMPLOYEES a
  28.     RIGHT OUTER JOIN DEPARTMENTS_2 b ON a.DEPARTMENT_ID = b.DEPARTMENT_ID
  29. ;
  30.  
  31.  
  32. SELECT
  33.     a.EMPLOYEE_ID, a.FIRST_NAME, a.LAST_NAME, a.DEPARTMENT_ID, b.DEPARTMENT_NAME
  34. FROM
  35.     EMPLOYEES a
  36.     LEFT OUTER JOIN DEPARTMENTS_2 b ON a.DEPARTMENT_ID = b.DEPARTMENT_ID
  37. ;
RAW Paste Data