0% found this document useful (0 votes)
3 views1 page

SQL Query

The document outlines the creation of an Employee table with specific attributes and data insertion using SQL. It includes various SQL queries for selecting employee details based on specific criteria, modifying the table structure by adding and deleting columns, and changing data types. Additionally, it addresses the dropping of the primary key constraint from the emp_id column.

Uploaded by

king20001409
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

SQL Query

The document outlines the creation of an Employee table with specific attributes and data insertion using SQL. It includes various SQL queries for selecting employee details based on specific criteria, modifying the table structure by adding and deleting columns, and changing data types. Additionally, it addresses the dropping of the primary key constraint from the emp_id column.

Uploaded by

king20001409
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Create a table with the following filled and then insert the following data using sql.

Table Name:- Employee


Emp_id – primary key,emp name size 20

Empid EmpName Department ContactNo EmailId EmpHeadId


101 Isha E-101 1234567890 isha@[Link] 105
102 Priya E-104 1234567890 priya@[Link] 103
103 Neha E-101 1234567890 neha@[Link] 101
104 Rahul E-102 1234567890 rahul@[Link] 105
105 Abhishek E-101 1234567890 abhishek@[Link] 102

Now solve the following using SQL

[Link] the detail of the employee whose name start with P.


2. Select the detail of employee whose emailId is in gmail.
[Link] the details of the employee who work either for department E-104 or E-102.
4. What is the department name for DeptID E-102?
5. Add an attribute called salary and filled the salary data.

6. What is the department name for DeptID E-102?


[Link] another column called mobile no

[Link] the mobile column.

[Link] the name EmpHeadId to HeadId

[Link] the size of datatype of name from 20 to 40

[Link] the primary key attribute from the emp_id column.

You might also like