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
Find five random employees from a random department
Expert Solution
arrow_forward
Step 1
- Syntax to select a random record:
SELECT column FROM (SELECT column FROM table ORDER BY dbms_random.value) WHERE rownum =1
By using the above syntax, Initially, a random department (DEPTNO) is retrieved from the DEPT table. Using DEPTNO, 5 random employee records are retrieved from the EMP table.
NOTE: Sample Data is considered to implement query on EMP and DEPT table.
arrow_forward
Step 2
Data in EMP Table:
Data in DEPT table:
Step by stepSolved in 3 steps with 4 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
- Select a random working day in your work week. Log all activities that qualify as communication activities (e.g. talking to friends over coffee, obtaining information from a fellow student, providing information, negotiating, advertising, browsing the web). Which fraction of your working day does communication represent?arrow_forwardDelete an employee having ID = 203 (e.g.) Commit changes if that employee’s manager id = 105 Otherwise rollback all the changes. Use Employees table.arrow_forwardCorporation: id 15 17 20 instance: Company: cid id 1 2 3 4 5 15 17 15 20 15 Assumptions: id in Company references id in Corporation. • cid in Department references cid in Company. Department: did cid 1 2 3 4 5 6 7 8 9 10 11 12 5 1 2 2 3 5 1 3 3 1 2 4 Each option starts from the original tables (given above) NOT from the tables modified by the previous option You don't need to copy the entire table. Just explain the action of each operation. (a) Suppose that all the foreign keys are declared using on delete restrict. What is the effect of the instruction delete from Company where cid=2? (b) Suppose that all the foreign keys are declared using on delete cascade. What is the effect of the instruction delete from Corporation where id-15?arrow_forward
- You need to make use of an Oracle function in order to compute the number of days that have passed from your birthday up to the present moment.arrow_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_forwardHow many rows would be returned from a cross join of tables A and B, if A contains 8 rows and B contains 18? 8 18 26 144arrow_forward
- Composite datatypes can only have multi row &multi column values in them Answers: Yes Noarrow_forwardTo find out how many years have passed since your birthday, you may utilize an Oracle function.arrow_forwardA simple Oracle function may determine the number of years since your birth by comparing today's date with your birthday.arrow_forward
- A table called "game1" contains three columns and twenty rows, but "game2" has the same column as game1 (ie 3) and fifteen rows. Both tables have 5 rows in common. What is the degree and cardinality of the resulting table if we take union?arrow_forwardSql server 2019 Get a count of Invoices that have a Payment Total greater than $1,000.arrow_forwardQuestion 18 What Excel function is used to generate a random number between 0 and 1? =RAND() =RANDGEN() =RANNUM() =NUMGEN() * Previous Next Not saved Submiarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
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