Create a table with the foll columns. nae of employee (NAME, variable character) Date of birth(DOB, date) Salary of employee(SALARY,integer) Department(DEPT, variable character) [Department :SALE,ACCT,MARKETING]
Create a table with the foll columns.
nae of employee (NAME, variable character)
Date of birth(DOB, date)
Salary of employee(SALARY,integer)
Department(DEPT, variable character)
[Department :SALE,ACCT,MARKETING]
![10:28
26
_3
Create table Emp with columns (Emp_Id int), (EName varchar(20)), (Age int),
designation (Desg varchar(15)), (Salary dec(9,2)). Enter 7 records.
a. Display all rows.
Insert a new column Address varchar (20) between EName and Age.
c. Supply values for the newly added column and Display all rows.
Give your own queries using where, order by and between clauses.
Sort the rows based on EName.
f. Delete rows where EName starts with a specified letter of your choice and
display the remaining rows.
g. Count number of employees with different age.
h. Display distinct designations.
Count number of employees with different designation.
j. Delete all the rows of this table.
k. See the structure of the table.
1. Delete the table Emp from the database.
e.
i.
********* k](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fd312b36f-5baa-4587-8c8f-53e7d3457cc6%2Fda9f9ab7-695b-4233-90f4-e37cda2d7570%2Fptp20ht_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Note: - As per the guidelines we can only answer one specific question at a time. Since you have not mentioned the specific question. So I am answering the first one. Please resubmit the second question so that we can help you.
The SQL syntax to create the table, fill the records, and display the records is given below: -
Explanation: -
The CREATE command creates the structure of the table with the given column names.
The INSERT INTO command inserts the records in the table.
The SELECT command selects the records from the table and display the output.
Syntax: -
/* Create a table called EMPLOYEE */
CREATE TABLE EMPLOYEE(Name char, DOB date, SALARY integer, DEPT char);
/* Create few records in this table */
INSERT INTO EMPLOYEE VALUES('Tom', '01-12-1999', 12345, 'SALE');
INSERT INTO EMPLOYEE VALUES('Lucy', '21-01-1998', 31233, 'ACCT');
INSERT INTO EMPLOYEE VALUES('Frank', '11-07-1997', 43534, 'SALE');
INSERT INTO EMPLOYEE VALUES('Jane', '15-10-1998', 65454, 'MARKETING');
INSERT INTO EMPLOYEE VALUES('Robert', '16-04-2000', 57655, 'ACCT');
/* Display all the records from the table */
SELECT * FROM EMPLOYEE;
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)