Question: 1. Create the following table with name Employee2020: Field Datatype Constraint Eid Number(4) Primary key Ename Varchar2(20) Sal Number(8,2) Default value =3000.00 Dept Number(3) 2.
1. Create the following table with name Employee2020:
Field | Data type | Constraint |
Eid | Number(4) | Primary key |
Ename | Varchar2(20) | |
Sal | Number(8,2) | Default value =3000.00 |
Dept | Number(3) |
2. Insert the following values into the above table, which record insertion is violating the constraints:
Eid | Ename | Sal | Dept |
2017 | Nasma | 3500.00 | 12 |
2016 | Reem | 4000.00 | 12 |
2018 | Nahe | 11 | |
2014 | Baya | 5600.00 | 12 |
2019 | Nasar | 5200.00 | 14 |
3. Select all the employees whose dept =12.
4. Find the details of the employees whose ename starts with the letter ‘N’ using like clause.
5. Sort the table in ascending order of Eid.
6. Delete the record with ‘Eid= 2017’ from the Employee2020 table.
7. Alter the table Employee2020 by adding the following column, “Admin” whose data type is number.
8. Display the sum of sal.
9. Count the number of employees group by dept.
10. Write the query to unite two tables without duplicates.
1 | Final lab Assignment ITEC211 |
Step by Step Solution
3.49 Rating (166 Votes )
There are 3 Steps involved in it
Answer 1 Create the table sql CREATE TABLE Employee2020 Eid NUMBER4 PRIMARY KEY Ename VARCHAR220 Sal ... View full answer
Get step-by-step solutions from verified subject matter experts
