Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

bartleby

Concept explainers

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
expand button
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
Check Mark
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;

bartleby

Step by stepSolved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Background pattern image
Computer Science
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
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education