Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
Write an anonymous block to read 5 numbers from the keyboard and find their sum and average with oracle pl sql
(Hint: use for loop)
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps with 1 images
Knowledge Booster
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
- - Write SQL statement to list the OrderID, CustName and OrderDate from Orders table using INNER JOIN with Customers table on CustID - Create a table that list the OrderID, CustID and CustName from Orders table using LEFT JOIN with Customers table on CustID.arrow_forwardPLZ help with the following: Use oracle live sql to change the following commands so that they work with creating the table CREATE TABLE `book`( `num` INT(20) NOT NULL AUTO_INCREMENT, `title` VARCHAR(20), `year` DATE, `subject` VARCHAR(20), `checkedout` DATETIME, `checkedin` DATETIME, PRIMARY KEY (`num`) ); CREATE TABLE `client`( `CID` INT(20) NOT NULL AUTO_INCREMENT, `fname` VARCHAR(25), `lname` VARCHAR(25), `type` VARCHAR(25), `num` INT(20), PRIMARY KEY (`CID`), FOREIGN KEY (`num`) REFERENCES `emp`.`state`(`state_id`) ); CREATE TABLE `author`( `id` INT(10) NOT NULL AUTO_INCREMENT, `year` DATE, `fName` VARCHAR(20), `lname` VARCHAR(20), `num` INT(20), PRIMARY KEY (`id`) ); ALTER TABLE `author` ADD FOREIGN KEY (`num`) REFERENCES `book`(`num`); ALTER TABLE `client` ADD CONSTRAINT `client_ibfk_1` FOREIGN KEY (`num`) REFERENCES `book`(`num`);arrow_forwardTo compute the number of days between your birthday and the current date, which Oracle function should you use?arrow_forward
- plz fix the following so it runs on sql developper or sql live CREATE TABLE DONORS (donor_id INT NOT NULL,donor_name varchar(255) NOT NULL,donor_age int,PRIMARY KEY (donor_id ),);CREATE TABLE DONATIONS(pledge_id INT NOT NULL,pledge_date varchar(255) NOT NULL,amount_pledged int,Is_paid int,donor_id int,PRIMARY KEY (pledge_id ),FOREIGN KEY (donor_id) REFERENCES DONORS(donor_id));arrow_forwardIs this statement true or false: Oracle SQL allows full expression-based use of both provided (built-in) and user-definable functions.arrow_forwardWrite a PL/SQL Programming block to do below actions 2.Before you work on Quesiton 2 , please create a table because you will be inserting numbers in thisMessages tableCREATE TABLE messages( RESULTS NUMBER)Run below query to see if there is any data :SELECT * FROM MESSAGESarrow_forward
- i amm trying to do some work in sql developer insert data from nametest to names i want only to insert year ,name and gender ,then create a id for each data in the databse . what commend shouldi use ? i try "INSERT INTO names(Year, Name, gender),SELECT (Year_, name_, genderA) FROM namestest; it shows Error starting at line : 1 in command -INSERT INTO names(Year, Name, gender),SELECT (Year_, name_, genderA) FROM namestestError at Command Line : 2 Column : 21Error report -SQL Error: ORA-00926: missing VALUES keyword00926. 00000 - "missing VALUES keyword"*Cause: how to make it corrrect ?and make a "id "for each data ?arrow_forwardThis is for SQL Give me a list of all of our vendors (by their name) and, if they have an invoice, give me the total number of invoices we have from them and the invoice date of their first invoice. The invoice date results should be provided in a way that shows the date only in the following format: mm/dd/yyyy (e.g. 10/04/2021)arrow_forwardInclude both SQL commands and SQL results in your answers: KimTay Pet Supplies is running a promotion that is valid for up to 20 days after an order is placed. List the invoice number, customer ID, customer first and last names, and the promotion date for each invoice. The promotion date is 20 days after the invoice was placed. Write PL/SQL (or MySQL) procedures to accomplish the following task: The procedure accepts the ID of a customer stored in the input variable named I_CUST_ID and displays the name (first name concatenated with last name) and credit limit of for this customer.arrow_forward
- . Write a T-SQL correlated subquery selecting the store code, store name, store ytd sales from the store table where the store code matches the selection result of the max store code from the store table where the store code matches. /* Created with SQL Script Builder v.1.5 */ /* Type of SQL : SQL Server */ CREATE TABLE EMPLOYEE ( EMP_CODE int, EMP_TITLE varchar(4), EMP_LNAME varchar(15), EMP_FNAME varchar(15), EMP_INITIAL varchar(1), EMP_DOB datetime, JOB_CODE varchar(5), STORE_CODE int ); INSERT INTO EMPLOYEE VALUES('1','Mr.','Williamson','John','W','5/21/1964','SEC','3'); INSERT INTO EMPLOYEE VALUES('2','Ms.','Ratula','Nancy','','2/9/1969','MGR','2'); INSERT INTO EMPLOYEE VALUES('3','Ms.','Greenboro','Lottie','R','10/2/1961','GEN','4'); INSERT INTO EMPLOYEE VALUES('4','Mrs.','Rumpersfro','Jennie','S','6/1/1971','GEN','5'); INSERT INTO EMPLOYEE VALUES('5','Mr.','Smith','Robert','L','11/23/1959','GEN','3'); INSERT INTO EMPLOYEE…arrow_forwardOracle SQL:- select to_char('20/02/2022','mm/dd/yyyy') from dual; Error: invalid number. Concert Date into MM/DD/YYYY format.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- 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
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)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education