Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 12, Problem 3RQ
Program Description Answer
The statement to select and to sort the records in descending order by the field SSN from the table PayInfo is SELECT SSN FROM PayInfo ORDER BY SSN DESC.
Hence, the correct answer is option “B”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Problem 26
Create a MySQL trigger named trg_updatecustbalance to update the CUST_BALANCE in the CUST_MYSQL table when a new invoice record is entered. (Assume that the sale is a credit sale.) Whatever value appears in the INV_AMOUNT column of the new invoice should be added to the customer’s balance. Test the trigger using the following new INV_MYSQL record, which would add 225.40 to the balance of customer 2001:
3)
Create a SQL statement/s to Add/insert the following records in the CLIENTS table:
CLIENTS
CID
CName
Gender
Address
Contact
CType
1521
Ahmed Said
Male
SLL
92214561
Old
1522
Salma Mohammed
Female
MCT
92384792
New
1523
Faiza Ahmed
Female
SLL
97451382
Old
1524
Noaman Said
Male
NZW
New
using postgresql:
Write a trigger that will be activated when a new customer is added to the Customers table and that verifies that the ID of the new record does not yet exist in the table. If it does, the request shall be rejected.
Show what happens when a record with an existing ID is attempted to be added to the Customer table to verify that your trigger is working properly.
Customers table columns: id, first name, last name, email
Chapter 12 Solutions
Programming with Microsoft Visual Basic 2017
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
- Table: Author Author_ID DZN9010 VC8931 STA7686 iv. a. How can we remove the transitive dependencies from the table above? i. Create a separate Name table with Author_ID as primary key ii. Create a separate Book table with Book_ID as primary key iii. Create a separate Origin table with Origin_ID as primary key Create a Book_ID and make it a foreign key in Author table ii, iii Author_Name J.K. Rowling Arthur Conan Doyle Suzanne Collins b. ii, iii, iv c. i, ii, iv d. il only Book Title Harry Potter Sherlock Holmes Hunger Games Author_Origin England Scotland USAarrow_forwardCreate a database Stored procedure for the following situations: CUSTOMER(CUST CODE NUMBER,CUST_LNAME,CUST_FNAME,CUST_BALANCE) INVOICE(INV NUMBER,CUS_CODE,INV_DATE,INV_AMT) To add a new invoice record to the INVOICE table.Use the following values in the new record: 8006,1000,'30-APR-16',301.72. Run a query to see if the record has been added.arrow_forwardProblem 27 Write a procedure named prc_cust_add to add a new customer to the CUST_MYSQL table. Use the following values in the new record: CUIST_NUM CUST_LNAME CUST_FNAME CUST_BALANCE 2003 Rauthor Peter 0.00 (You should execute the procedure and verify that the new customer was added to ensure your code is correct.) Problem 29 Write a trigger to update the CUST_BALANCE when an invoice is deleted. Name the trigger trg_updatecustbalance2. (You should delete INV_NUM 9006 from INV_MYSQL to ensure your code is correct.) Problem 30 Write a procedure to delete an invoice, giving the invoice number as a parameter. Name the procedure prc_inv_delete. Test the procedure by deleting invoices 9000 and 9001arrow_forward
- 25- Create a SQL statement/s to insert the following records in the CLIENTS table: CLIENTS CID CName Gender Address Contact CType 1521 Ahmed Said Male SLL 92214561 Old 1522 Salma Mohammed Female MCT 92384792 New 1523 Faiza Ahmed Female SLL 97451382 Old 1524 Noaman Said Male NZW Newarrow_forward################## You would like to join two tables table1 and table2 together. Each of the two tables contains 25,000 records. What is the maximum number of records you could receive in the table resulting from this join? #################arrow_forwardSuppose that the following are true:- all id column are primary keys in whichever table they are- the dept_id in course table is foreign key that is referencing the id column in the department table- the foreign keys stud_type_id, stud_cat_id in the student table are referencing the id columnsin the student_type and student_category tables respectively.- the coursecode and stud_id columns in the registration table are foreign keys in the courseand student tables respectively.1. Design an Entity Relationship Diagram for the system above.2. Write query that would return the names and contacts of all Local students.3. Write a query that would return names, contact and locations of all departments that has alocation text with Ave 3 as part of it. [hint: use the LIKE clause with “_” or “%”]4. What would be the result returned for the following query:SELECT first_name, last_name, student_type.name,student_category.nameFROM student, student_type, student_categoryWHERE stud_type_id =…arrow_forward
- How do we determine the data type to utilise in Microsoft Access tables?arrow_forwardQ2: A-Given the following tables: Student Subject Std_ID 001 002 003 004 Fname Smith Smith Beal Thomson Lname Jolin Susan Fred Marie Std_ID 001 001 002 002 003 Semester 004 Falls03 Spro4 Falls03 C_ID Eng01 Ger01 Eng01 Ger01 Ger01 CSection Spro4 Spro4 Spro4 1. For each table in the database, identify the primary key and the foreign key(s). 2. Do the tables exhibit entity integrity? Explain your answer? 3. Do the tables exhibit referential integrity? Explain your answer? Ita01 ZZZZZZ IN 2N IN 2N IN CName English IN German English German German Italian Grade A B A B A Barrow_forwardCreate a MySQL trigger named trg_updatecustbalance to update the CUST_BALANCE in the CUST_MYSQL table when a new invoice record is entered. (Assume that the sale is a credit sale.) Whatever value appears in the INV_AMOUNT column of the new invoice should be added to the customer’s balance. Test the trigger using the following new INV_MYSQL record, which would add 225.40 to the balance of customer 2001: INV_NUM CUST_NUM INV_DATE INV_AMOUNT 9005 2001 2018-04-27 225.40arrow_forward
- Create a MySQL trigger named trg_updatecustbalance to update the CUST_BALANCE in the CUST_MYSQL table when a new invoice record is entered. (Assume that the sale is a credit sale.) Whatever value appears in the INV_AMOUNT column of the new invoice should be added to the customer’s balance. Test the trigger using the following new INV_MYSQL record, which would add 225.40 to the balance of customer 2001:arrow_forwardThe client hands you a supplier file and transaction file, but isn't sure how to connect the tables together. Which is the most logical: a. Primary Key of Supplier ID in the Supplier File connected to the Primary Key of Supplier ID in the Transaction File b.Primary Key of Supplier ID in the Supplier File connected to the Foreign Key of Supplier ID in the Transaction File c. Foreign Key of Supplier ID in the Supplier File connected to the Primary Key of Supplier ID in the Transaction File d.Foreign Key of Supplier ID in the Supplier File connected to the Foreign Key of Supplier ID in the Transaction Filearrow_forward25-Create a SQL statement/s to Add/insert the following records in the CLIENTS table: CLIENTS CID CName Gender Address Contact CType 1521 Ahmed Said Male SLL 92214561 Old 1522 Salma Mohammed Female MCT 92384792 New 1523 Faiza Ahmed Female SLL 97451382 Old 1524 Noaman Said Male NZW Newarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
SQL Basics for Beginners | Learn SQL | SQL Tutorial for Beginners | Edureka; Author: edureka;https://www.youtube.com/watch?v=zbMHLJ0dY4w;License: Standard YouTube License, CC-BY