image.png

Instruction

  1. name sql
  2. countries
  3. CREATE TABLE countries(
  4. country_id varchar(2) primary key not null,
  5. country_name varchar(40) not null,
  6. region_id integer(2) not null)
  7. regions
  8. CREATE TABLE regions(
  9. region_id integer(2) primary key not null,
  10. region_name varchar(25) not null)
  11. locations
  12. CREATE TABLE locations(
  13. location_id integer(4) primary key not null,
  14. street_address varchar(25) not null,
  15. postal_code varchar(12),
  16. city varchar(30) not null,
  17. state_province varchar(12),
  18. country_id varchar(2))
  19. departments
  20. CREATE TABLE departments(
  21. department_id integer(3) primary key not null,
  22. depart_name varchar(20) not null,
  23. manager_id integer(3) not null,
  24. location_id integer(4))
  25. jobs
  26. CREATE TABLE jobs(
  27. job_id varchar(10) primary key not null,
  28. job_title varchar(25) not null,
  29. min_salary decimal,
  30. max_salary decimal)
  31. employees
  32. CREATE TABLE employees(
  33. employee_id integer(3) primary key not null,
  34. first_name varchar(20),
  35. last_name varchar(25),
  36. email varchar(25),
  37. phone_number varchar(20),
  38. hire_date date,
  39. job_id varchar(10) not null,
  40. salary decimal,
  41. commission_pct number,
  42. manager_id integer(3),
  43. department_id integer(3), Avg_Salary NUMERIC)
  44. department
  45. CREATE TABLE department(
  46. "department_id" TEXT,
  47. "department_name" TEXT,
  48. "manager_id" TEXT,
  49. "location_id" TEXT
  50. )
  51. job_history
  52. CREATE TABLE job_history(
  53. employee_id integer(3) not null,
  54. start_date date not null,
  55. end_date date not null,
  56. job_id varchar(10) not null,
  57. department_id integer(3) not null)
  58. prod_mast
  59. CREATE TABLE prod_mast(
  60. prod_id integer PRIMARY KEY,
  61. prod_name text(20),
  62. prod_rate integer,
  63. prod_qc text(20) DEFAULT 'OK')
  64. prod_backup
  65. CREATE TABLE prod_backup(
  66. prod_id integer PRIMARY KEY,
  67. prod_name text(20),
  68. prod_rate integer,
  69. prod_qc text(10) DEFAULT 'OK')
  70. orders
  71. CREATE TABLE orders(
  72. ord_no integer PRIMARY KEY,
  73. item_id integer ,
  74. item_name text(20),
  75. ord_qty integer,
  76. cost integer)
  77. tb1
  78. CREATE TABLE tb1 (c1 INT, c2 CHAR(5), c3 FLOAT)
  79. ESERCICIO1
  80. CREATE TABLE ESERCICIO1(C TEXT, D TEXT)
  81. users
  82. CREATE TABLE users(name varchar(128), email varchar(128))
  83. tags
  84. CREATE TABLE tags (
  85. title TEXT,
  86. description TEXT,
  87. created TEXT
  88. )
  89. s
  90. CREATE TABLE s( A int, D int, E int)
  91. r
  92. CREATE TABLE r (A int, B int)
  93. Emor
  94. CREATE TABLE Emor(
  95. ID INT PRIMARY KEY NOT NULL,
  96. NAME TEXT)
  97. MIN_SALARY
  98. CREATE TABLE MIN_SALARY(job_id TEXT,MIN_SALARY)
  99. employee_data
  100. CREATE TABLE employee_data (employee_name TEXT, item TEXT, rate REAL, quantity INTEGER, date TEXT, id INTEGER PRIMARY KEY)
  101. STUDENT
  102. CREATE TABLE STUDENT(
  103. ID INT PRIMARY KEY NOT NULL,
  104. NAME TEXT NOT NULL,
  105. AGE INT NOT NULL,
  106. ADDRESS CHAR(50),
  107. FEES REAL
  108. )
  109. EMPLOYEE_INCOME
  110. CREATE TABLE EMPLOYEE_INCOME
  111. (EMPID NUMBER(10),
  112. NAME VARCHAR2(20),
  113. SALARY NUMBER(10))
  114. details CREATE TABLE details
  115. (id number(8,0),
  116. name varchar2(50),
  117. weight number(8,0),
  118. turn number(8,0)
  119. )