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]
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