Course Hero Logo

NEWDATABASE.txt - DROP EMPLOYEEE; CREATE TABLE EMP( Eno...

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 - 2 out of 3 pages.

DROP EMPLOYEEE;CREATE TABLE EMP(Eno CHAR(3) NOT NULL,Ename VARCHAR(50) NOT NULL,Job_type VARCHAR(50) NOT NULL,Manager CHAR(3),Hire_date DATE NOT NULL,Dno INT,Commission DECIMAL(10,2),Salary DECIMAL(7,2) NOT NULL,PRIMARY KEY(Eno));CREATE TABLE DEPARTMENT(Dno INT NOT NULL,Dname VARCHAR(50),Location VARCHAR(50) DEFAULT 'New Delhi'PRIMARY KEY(Dno));ALTER TABLE EMP ADD FOREIGN KEY(Manager) REFERENCES EMP(Eno));ALTER TABLE EMP ADD FOREIGN KEY(Dno) REFERENCES DEPARTMENT(Dno));INSERT INTO EMP VALUES('765','Martn','Sales_man','769','22-APR-81','30','1400','1250');INSERT INTO EMP VALUES('752','Ward','Sales_man','769','22-FEB-22','30','500','1300);INSERT INTO EMP VALUES('749','Allan','Sales_man','769','20-FEB-81','30','300','2000');INSERT INTO EMP VALUES('793','Millr','Clerk','788','23-JAN-82','40','0','1300');INSERT INTO EMP VALUES('792','Ford','Analyst','756','03-DEC-81','20','0','2600');INSERT INTO EMP VALUES('790','James','Clerk','769','03-DEC-81','30','0','950');INSERT INTO EMP VALUES('787','Adams','Clerk','778','12-JAN-83','20','0','1150');INSERT INTO EMP VALUES('784','Turnr','Sales_man','769','08-APR-81','30','0','1450');INSERT INTO EMP VALUES('783','King','President','','17-NOV-81','10','0','2950');INSERT INTO EMP VALUES('788','Scott','Analyst','756','09-DEC-82','20','0','2900');

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 3 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Winter
Professor
Tanmoy
Tags
Ename, eno, table emp, SELECT ename

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture