
Concept explainers
It doen't show output, fix the code
-- Create the Clients table
CREATE TABLE Clients (
ClientID VARCHAR2(10) PRIMARY KEY,
ClientName VARCHAR2(255),
ZipCode VARCHAR2(10),
ClientCode VARCHAR2(1),
Contact VARCHAR2(255),
OrderDate DATE
);
-- Commit the changes to save the table structure
COMMIT;
-- Populate the Clients table with data from Figure 2
INSERT INTO Clients (ClientID, ClientName, ZipCode, ClientCode, Contact, OrderDate)
VALUES
('B5182', 'Basic Broadcasting', '60631', 'A', 'Sammy', TO_DATE('08/03/2019', 'MM/DD/YYYY')),
('C1825', 'Computer Capers', '60656', 'A', 'Sammy', TO_DATE('01/18/2020', 'MM/DD/YYYY')),
('D8125', 'David D. Davies', '60625', 'B', 'George', TO_DATE('02/02/2020', 'MM/DD/YYYY')),
('E5051', 'Edward\'s Enterprise', '60604', 'A', 'Paula', TO_DATE('02/28/2020', 'MM/DD/YYYY')),
('F5150', 'Frank\'s Fixtures', '60629', 'C', 'Paula', TO_DATE('01/07/2019', 'MM/DD/YYYY')),
('J4712', 'Jerry\'s Journals', '60634', 'F', 'Pete', TO_DATE('01/22/2020', 'MM/DD/YYYY')),
('M1758', 'Montrose Muffler', '60630', 'A', 'Sammy', TO_DATE('12/13/2019', 'MM/DD/YYYY')),
('M4158', 'Music for the Many', '60656', 'C', 'Paula', TO_DATE('12/02/2019', 'MM/DD/YYYY')),
('S8158', 'Styles on State', '60608', 'A', 'Steve', TO_DATE('02/12/2020', 'MM/DD/YYYY')),
('T0818', 'Taxes and More', '60618', 'B', 'Janet', TO_DATE('12/20/2021', 'MM/DD/YYYY'));
-- Commit the changes to save the table structure
COMMIT;
SELECT ClientID, ClientName
FROM Clients
WHERE ClientName LIKE '%mu%';

Step by stepSolved in 3 steps with 1 images

- Task 3: The Driver Relationship team wants to create some workshops and increase communication with the active drivers in InstantRide. Therefore, they requested a new database table to store the driver details of the drivers that have had at least one ride in the system. Create a new table, ACTIVE_DRIVERS, from the DRIVERS and TRAVELS tables which contains the following fields: DRIVER_ID CHAR(5) (Primary key) DRIVER_FIRST_NAME VARCHAR(20) DRIVER_LAST_NAME VARCHAR(20) DRIVER_DRIVING_LICENSE_ID VARCHAR(10) DRIVER_DRIVING_LICENSE_CHECKED BOOL DRIVER_RATING FLOAT ANSWER IN MYSQL PLEASEarrow_forwardALTER SESSION SET NLS_DATE_FORMAT = 'MM/DD/YYYY'; /* JOB TABLE */ CREATE TABLE JOB ( JOB_CODE varchar2(3) PRIMARY KEY, JOB_DESCRIPTION varchar2(25), JOB_CHG_HOUR float(8), JOB_LAST_UPDATE date ); INSERT INTO JOB VALUES('500','Programmer', '35.75','11/20/2015'); INSERT INTO JOB VALUES('501','Systems Analyst', '96.75','11/20/2015'); INSERT INTO JOB VALUES('502','Database Designer', '125', '3/24/2016'); INSERT INTO JOB VALUES('503','Electrical Engineer', '84.5', '11/20/2015'); INSERT INTO JOB VALUES('504','Mechanical Engineer', '67.9', '11/20/2015'); INSERT INTO JOB VALUES('505','Civil Engineer', '55.78','11/20/2015'); INSERT INTO JOB VALUES('506','Clerical Support', '26.87','11/20/2016'); INSERT INTO JOB VALUES('507','DSS Analyst', '45.95','11/20/2015'); INSERT INTO JOB VALUES('508','Applications Designer','48.1', '3/24/2016'); INSERT INTO JOB VALUES('509','Bio Technician', '34.55','11/20/2015'); INSERT INTO JOB…arrow_forwardCreate a schema user which will be application owner (in other words schema owner) User name: <YourName>_dba Profile: DEFAULT Password: Oracle1234 Default Tablespace: DBA625TS Assign default tablespace Quota: unlimited Temporary Tablespace: TEMParrow_forward
- Which of the following keywords allows the user to delete a record from a table, even if rows in another table reference the record through a FOREIGN KEY constraint? ( refer to the tables in the JustLee Books database). a. CASCADE b. CASCADE ON DELETE c. DELETE ON CASCADE d. DROP e. ON DELETE CASCADEarrow_forwardTask 5: The Developers team also wants you to ensure that emails are converted to lowercase after an update operation. Currently, new insertions are guaranteed to have lowercase emails, but there is no such guarantee for legacy emails. Therefore, the team wants to ensure that emails are being retained in a lowercase irrespective of any changes in the database. Create a new TRIGGER called email_update for the USERS table that runs before an UPDATE operation. Task: Create a TRIGGER to run on the USERS table before any UPDATE operation. (SQL Database Test): Create a TRIGGER before any UPDATE operations on the USERS tablearrow_forwardWrite and execute the command to retrieve the customer ID, first name, and last name of each customer in the MAJOR_CUSTOMER VIEW with a balance that exceeds the credit limit.arrow_forward
- Task 7: The development team wants to add new residents and new service requests to StayWell without checking the latest IDs and manually incrementing it. Therefore, you need to alter the RESIDENTS table and change the RESIDENT_ID field to an auto-incremented field of type SMALLINT. Task Alter the RESIDENTS table and change the ID field to an auto-incremented field. 1 Task 8: The Colombia City office of StayWell indicated that there is a new tenant by the name of Yigit Yilmaz staying at the property with an ID of 13. You need to include this new resident in the RESIDENTS table. Task Add Yigit Yilmaz to the RESIDENTS table. 1 Task 9: The StayWell property management team wants to add two additional properties and run some simulation tests relating to market coverage. Add the following properties to the PROPERTY table: PROPERTY_ID OFFICE_NUM ADDRESS SQR_FT BDRMS FLOORS OWNER_NUM 14 1 9 Houston Drive 1,100 2 1 MO100 15 1 11 Village Drive 1,300 3 1…arrow_forwardhe Car Maintenance team wants to add new maintenance tasks to the MAINTENANCES table which was created in Chapter 8, Activity 1. However, the team also wants to insert the tasks in a batch into the database. In other words, they want to insert the rows all together without inserting one-by-one. Therefore, you will need to create a script to add the following tasks and ensure that they are added together: Car ID: 1001, Maintenance Type: 2, Due: 2022-06-01 Car ID: 1003, Maintenance Type: 2, Due: 2022-06-01arrow_forwardWhen is creating an index manually inappropriate?a. when queries return a large percentage of rows in the resultsb. when the table is smallc. when the majority of table operations are updatesd. all of the abovee. only a and carrow_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





