SHARE
TWEET

Untitled

a guest Oct 22nd, 2019 181 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. insert into REGIONS(REGION_ID,NAME)
  2. values (100,'Balkans')
  3.  
  4. insert into COUNTRIES(COUNTRY_ID,NAME,REGION_ID)
  5. values ('BG', 'Bulgaria',100)
  6.  
  7. insert into DEPARTMENTS(DEPARTMENT_ID,NAME,COUNTRY_ID,CITY,ADDRESS,POSTAL_CODE)
  8. values(1,'Research','BG','Plovdiv','bul. Bulgaria-236','4000')
  9.  
  10. select*from DEPARTMENTS
  11.  
  12. insert into JOBS(JOB_ID,JOB_TITLE,MIN_SALARY,MAX_SALARY)
  13. values('DEV','Developer',8000,15000)
  14.  
  15. select*from JOBS
  16.  
  17. insert into EMPLOYEES(EMPLOYEE_ID,FNAME,LNAME,EMAIL,PHONE,HIRE_DATE,JOB_ID,SALARY,DEPARTMENT_ID)
  18. values(1,'Ivan','Ivanov','ivo@abv.bg','+359 8656 656',CONVERT(datetime,'15-10-2019',105),'DEV',12000,1)
  19.  
  20. select*from EMPLOYEES
  21.  
  22. insert into CUSTOMERS(CUSTOMER_ID,COUNTRY_ID,FNAME,LNAME,ADDRESS,EMAIL,GENDER)
  23. values(1,'BG','Malinka','Borovinkova','Asenovgrad ul. Trud','malinka@gmail.com','F')
  24.  
  25. select*from CUSTOMERS
  26.  
  27. insert into PRODUCTS(PRODUCT_ID,NAME,DESCR,PRICE)
  28. values(1,'Adata','Flash -2GB',30)
  29.  
  30. select*from PRODUCTS
  31.  
  32. insert into ORDERS(ORDER_ID,CUSTOMER_ID,EMPLOYEE_ID,ORDER_DATE)
  33. values(1,1,1,convert(datetime,'14-10-2019',105))
  34.  
  35. select*from ORDERS
  36.  
  37. insert into ORDER_ITEMS(ORDER_ID,PRODUCT_ID,UNIT_PRICE,QUANTITY)
  38. values(1,1,30,20)
  39.  
  40. select*from ORDER_ITEMS
  41.  
  42. UPDATE CUSTOMERS
  43. set LNAME='Kapinka',
  44.     ADDRESS='Plovdiv bul.Ruski'
  45. where customer_id=1
  46.  
  47. select*from CUSTOMERS
  48.  
  49. delete from ORDERS
  50.  
  51. select * from ORDERS
  52.  
  53. select*from ORDER_ITEMS
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top