Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
error_outline
This textbook solution is under construction.
Students have asked these similar questions
8. Create a trigger for the Invoices table that automatically inserts the vendor name and address for a paid invoice into a table named ShippingLabels. The trigger should fire any time the PaymentTotal column of the Invoices table is updated. The structure of the ShippingLabels table is as follows: CREATE TABLE ShippingLabels (VendorName varchar(50), VendorAddress1 varchar(50), VendorAddress2 varchar(50), VendorCity VendorState VendorZipCode varchar(50), char(2), varchar(20)); Use this UPDATE statement to test the trigger: UPDATE Invoices SET PaymentTotal = 67.92, PaymentDate = '2020-02-23' WHERE InvoiceID = 100;
9. Create a table client master with the following field’s client_no, name, address1, address2, city,
state, pin_code, remarks, and balance due and add the constraints?
• Create a primary key constraint on the column client_no.?
• create the following check constraints
Data values being inserted into the column client_no must start with ‘c’.
Data values being inserted into the column name should be allowed in upper case only?
a) Insert five rows in the table client master?
b) Show all rows of client master?
c) Add a new column in your table : AGE ?
d) Update the table client master ?
e) Delete a row from client master where age is greater than 60?
Open MS Access, create a database named “orderManagement” and perform the following task:
- Create a table named “Employee” having the following structure.
Field Name
Date type
employeeID
Auto Number
employeeLName
Text
employeeFName
Text
employeeAddress
Text
employeeHireDate
Date/Time
employeePHone
Text
Notes
✓ Set the field employeeID as the primary key.
✓ Set the Field Size field property of the fields employeeLName and employeeFName and employeeAddress to 50.
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
- Which of the following has no partial dependencies but can contain transitive dependencies? a. unnormalized data b. 1NF c. 2NF d. 3NFarrow_forwardWhich of the following has no repeating groups but can contain partial or transitive dependencies? unnormalized data 1NF 2NF 3NFarrow_forwardWhich of the following are constraints that can be used with the create table command? Select one: a. references, alias, check b. null, primary key, view of c. primary key, not null, unique d. primary key, default, betweenarrow_forward
- Which of the following is an inmemory copy of data pulled from one or more database tables? 1. Table adapter 2. Table relation 3. Dataset 4. Data recordarrow_forwardYou are working with an Access data base that has two tables you joined for a particular query. The tables and contents are: Auto table contains vin (text and primary key), make (text), model (text), color (text), mileage (number) Rental table contains customer# (number and part of primary key), date (date and part of primary key), vin code (text and part of primary key) Assuming you joined the table correctly, which of the following correctly limits the records displayed to those where the mileage is greater than 50000? Select one: a. mileage<50000 b. mileage>50000 c. mileage>#50000# d. mileage>"50000"arrow_forward134. EMPDET is an external table containing the columns EMPNO and ENAME. Which command would work in relation to the EMPDET table? a. UPDATE empdetSET ename = 'Amit'WHERE empno = 1234; b. DELETE FROM empdetWHERE ename LIKE 'J%'; c. CREATE VIEW empvuASSELECT * FROM empdept; d. CREATE INDEXempdet_idxON empdet(empno);arrow_forward
- Which of the following is NOT an issue specific to MariaDB? Substition variables do not work (& and &&) Group functions cannot include single row functions in the same statement || is not CONCATE by default Column aliases are not case sensitivearrow_forwardWhich of the following is true of foreign keys? A foreign key should always be linked to a primary key of another table. A foreign key could be linked to a candidate key of a table. A foreign key is not needed if the data type is different. A foreign key can be linked to any foreign key.arrow_forwardWhich one of the following statements regarding views is true? Creating views can improve query response time due to caching. View could be considered an additional layer of security on the underlying table which enables the DBA to protect intricate or sensitive data but still allow access. Views are virtual tables that are materialized at run time and as needed All of the statement are truearrow_forward
- in the question it said that "Assume that the Reward and Department tables have already been created " so i don't need to create the tables + there is a link from rewards and department to the Employee as in the picture for a reference, my answer is : CREATE TABLE Employee ( EMP_ID CHAR(3) NOT NULL,FNAME VARCHAR(15) NOT NULL,LNAME VARCHAR(15) NOT NULL,SALARY DECIMAL(10,2),JOIN_DATE DATEDEP_NO CHAR(2) NOT NULLPRIMARY KEY(EMP_ID),FOREIGN KEY(EMP_ID) REFRENCE Rewrad,FOREIGN KEY(DEP_NO) REFRENCE Department );is it wrong ?arrow_forwardCONSIDER THE INVOICE TABLE BELOW: invoice id NUMBER (12), invoice date DATE,Invoice total NUMBER (9, 2), payzent_total NUBER (9, 2), credit total NUMBER (9, 2),invoice due date DATE, payrent date DATE,CIL REC user VARCHAR2 (12),CTL SEC level NUMBER (1)Consider the INVOICE table structure below: A trigger is created on the INVOICE table: CREATE OR REPLACE TRIGGER rg_On_Quiz before insert or update on Invoice FOR EACH ROW DECLARE V_level Number; V_name VARCHAR (20); Begin SELECT USERNAME, SECURITY_LEVEL INTO V_name, V_level FROM AUTHORIZED_USERS WHERE USERNAME = USER; :NEW.CTL_REC_user := V_name; :NEW.CTL_REC_user := V_level; EXCEPTION WHEN NO_DATA_FOUND THEN RAISE_APPLICATION_ERROR (-2003, 'UNAUTHORIZED USER'); END; In Oracle/PLSQL, the USER function returns the user_id from the current Oracle session. a.) Explain what this triger does…arrow_forwardI need the output of the queries create table Accounts (account_no number primary key, client_name varchar2(200),Gender varchar2(20),address Varchar2(200)); create table loans (branch_id number, bank_name varchar2(200),Loan number, loan_Status varchar2(200),account_no number references Accounts(account_no) ON DELETE CASCADE); 1. delete from accounts where account_no= 101; 2. select * from accounts a where exists (select 1 from loans l where l.account_no= a.account_no) 3. select * from accounts a where exists (select 1 from loans l where l.account_no= a.account_no and status = 'accepted') 4. create or replace view view1 as select client_name , address,l.bank_name,l.loan_Status from accounts a, loans l where a.account_no = l.account_no Step 2 5.create or replace view view2 as select client_name , address,l.bank_name,l.loan_Status from accounts a, loans l where a.account_no = l.account_no and address = 'Karachi' 6. create or replace view view3 as select client_name ,…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
dml in sql with examples; Author: Education 4u;https://www.youtube.com/watch?v=WvOseanUdk4;License: Standard YouTube License, CC-BY