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]

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

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
Transcribed Image Text: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
Expert Solution
Step 1

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.

Step 2

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;

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Single Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education