Course Hero Logo

AASHISH(968)DEEPANSHU(905).txt - CREATE TABLE...

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 - 3 out of 5 pages.

CREATE TABLE DEEPANSHUAASHISH.DEPARTMENT(Dno INT NOT NULL PRIMARY KEY,Dname VARCHAR(50),Location VARCHAR(50) DEFAULT 'New Delhi');CREATE TABLE DEEPANSHUAASHISH.EMP(Eno CHAR(3) NOT NULL PRIMARY KEY,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);queryNEW1:SELECT Eno,Ename,Job_type,Hire_date FROM EMP;queryNEW2:SELECT DISTINCT Job_type FROM EMP;queryNEW3:SELECT Ename||', '||Job_type FROM EMP;queryNEW4:SELECT Eno||','|| Ename||','||Job_type||','||Manager||','||Hire_date||','||Dno||','||Commission||','||Salary AS THE_OUTPUT FROM EMP;queryNEW5:SELECT Ename,Salary FROM EMP WHERE Salary>2850;queryNEW6:SELECT Ename,Dno FROM EMP WHERE Eno='790';qyueryNEW7:SELECT Ename,Salary FROM EMP WHERE Salary NOT BETWEEN '1500' AND '2850';queryNEW8:SELECT Ename,Job_type,Hire_dateFROM EMPWHERE Hire_date between ('20-FEB-81') AND ('01-MAY-81') ORDER BY Hire_date;querynew9:SELECT Ename,DnoFROM EMPWHERE Dno=10 OR Dno=30 ORDER BY Ename;queryNEW10:SELECT Ename,DnoFROM EMPWHERE (Dno=10 OR Dno=30)AND Salary>1500;queryNEW11:SELECT Ename,Hire_date FROM EMP WHERE Hire_date LIKE '%81';
queryNEW12:SELECT Ename,Job_type FROM EMP WHERE Manager IS NULL;queryNEW13:

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 5 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Winter
Professor
Tanmoy
Tags
Relational model, Join, Ename, SELECT eno

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture