Download SQLWord9i User's Guide and Reference
Transcript
Example3.docx This is an example of an advanced Tables Report demonstrating some interesting constructions. DEPARTMENTS Departments table that shows details of departments where employees work. Contains 27 rows; references with locations, employees, and job_history tables. Columns Name DEPARTMENT_ID DEPARTMENT_NAME Datatype number (4) varchar2 (30) MANAGER_ID number (6) LOCATION_ID number (4) Nullable not null not null Comments Primary key column of departments table. A not null column that shows name of a department. Administration, Marketing, Purchasing, Human Resources, Shipping, IT, Executive, Public Relations, Sales, Finance, and Accounting. Manager_id of a department. Foreign key to employee_id column of employees table. The manager_id column of the employee table references this column. Location id where a department is located. Foreign key to location_id column of locations table. Primary key Name DEPARTMENTS Column department_id Status enabled Foreign keys Name DEPT_MGR_FK DEPT_LOC_FK Column manager_id location_id Related to table EMPLOYEES LOCATIONS Column employee_id location_id Status enabled enabled Check constraints Name DEPT_NAME_NN Condition "DEPARTMENT_NAME" IS NOT NULL Indexes Name DEPT_ID_PK DEPT_LOCATION_IX Uniqueness unique nonunique Column department_id location_id Tablespace system system Status valid valid Output document generated from example3.docx SQLWord11 Users Guide and Reference 22