Concept explainers
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 stepSolved in 3 steps with 1 images
- Update rows in Horse table Using MYSQL The Horse table has the following columns: ID - integer, auto increment, primary key RegisteredName - variable-length string Breed - variable-length string, must be one of the following: Egyptian Arab, Holsteiner, Quarter Horse, Paint, Saddlebred Height - decimal number, must be ≥ 10.0 and ≤ 20.0 BirthDate - date, must be ≥ Jan 1, 2015 Make the following updates: Change the height to 15.6 for horse with ID 2. Change the registered name to Lady Luck and birth date to May 1, 2015 for horse with ID 4. Change every horse breed to NULL for horses born on or after December 22, 2016.arrow_forward1. a) Create a table bank_master Column Name Datatype Varchar2(4) Varchar2(30) Varchar2(30) Number (7) b) Insert the records using the following table values Constraint accountno Not Null name address amount accountno name Address amount 101 Mohamed Burka 9000 102 Nasser Nizwa 8000 103 Khamiz Sohar 8200 104 Murshid Burka 7800 106 Mustasim Sohar 9500 a) Create a table bank_details Column Name Datatype Varchar2(4) number(4) date Constraint Recurrent_acno Not Null ac_no Transaction_date Fixed_deposit Number(8) b) Insert the records using the following table values Recurrent_acno | ac_no Transaction_date Fixed_deposit С101 101 12.05.2002 10000 C102 102 13.01.2020 80000 C103 103 14.02.2021 50000 C101 104 13.05.2020 40000 C102 105 15.06.2019 nullarrow_forwardDo all parts and attach screenshotsarrow_forward
- SQLarrow_forwardData basearrow_forwardList the names of all Staff members who hold a faculty position and have a salary of $45,000 or less. Show their names as their first name, followed by a space, and then their last name but sort the list alphabetically by last name and then first name. Hint: Check out the Position column in the Staff table. All staff members who do not hold a faculty position will get a bonus this year equal to 5% of their salary. List the names, current salary, and bonus amount for each Staff member (non-faculty) who is due a bonus. Show your list in order with the person receiving the highest bonus first.arrow_forward
- Create a report of employees within the Research department showing First Name, Last Name, sorted alphabetically A-Z.arrow_forwardtable not copiedarrow_forwardTable name: Products Column Role Data Type Length Constraint Name P ID Stores the ID of a product Number 8. Primary key P Name Stores the name of a product Varchar2 25 P_entryDate Stores the entry date of a product Stores the expiry date of a product Date Cannot be null P_Expiry P Expiry date should be greater than P entryDate Date P Price Stores the price of a product Number 3,2 Cannot be null a) Write in SQL a command that creates the table Products according to the above description (2 marks). b) Write in SQL a statement that adds to the table Products a new column named supplierID of type Number(5). This column should be defined as a foreign key that relates the table Products to the table Supplier (1.5 marks). c) Write in SQL a query that lists all the details of products arranged in descending order according to the entry date (1.5 marks).arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education