Oracle 12c: SQL
Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 4, Problem 11MC

In the initial creation of a table, if a UNIQUE constraint is included for a composite column that requires the combination of entries in the specified columns to be unique, which of the following statements is correct?

  1. a. The constraint can be created only with the ALTER TABLE command.
  2. b. The constraint can be created only with the table-level approach.
  3. c. The constraint can be created only with the column-level approach.
  4. d. The constraint can be created only with the ALTER TABLE … MODIFY command.
Blurred answer
Students have asked these similar questions
In the initial creation of a table, if a UNIQUE constraint is included for a composite column that requires the combination of entries in the specified columns to be unique, which of the following statements is correct? ( refer to the tables in the JustLee Books database).                                                        a. The constraint can be created only with the ALTER TABLE command.            b. The constraint can be created only with the table-level approach.               c. The constraint can be created only with the column-level approach.          d. The constraint can be created only with the ALTER TABLE … MODIFY command
Write a script that creates and calls a stored procedure named spInsertInstructor that inserts a row into the Instructors table. This stored procedure should accept one parameter for each of these columns: LastName, FirstName, Status, DepartmentChairman, AnnualSalary, and DepartmentID. This stored procedure should set the DateAdded column to the current date. If the value for the AnnualSalary column is a negative number, the stored procedure should raise an error that indicates that this column doesn’t accept negative numbers. Code at least two EXEC statements that test this procedure.
Based on script below , answer question in photo   CREATE TABLE DOCTOR(DOC_ID NUMBER(3),DOC_NAME VARCHAR2(9),DATEHIRED DATE,SALPERMON NUMBER(12),AREA VARCHAR2(20),SUPERVISOR_ID NUMBER(3),CHGPERAPPT NUMBER(3),ANNUAL_BONUS NUMBER(5),CONSTRAINT DOCTOR_DOC_ID_PK PRIMARY KEY (DOC_ID));   CREATE TABLE PATIENT(PT_ID NUMBER(3),PT_LNAME VARCHAR2(15),PT_FNAME VARCHAR2(15),PTDOB DATE,DOC_ID NUMBER(3),NEXTAPPTDATE DATE,LASTAPPTDATE DATE,CONSTRAINT PATIENT_PT_ID_PK PRIMARY KEY (PT_ID),CONSTRAINT PATIENT_DOC_ID_FK FOREIGN KEY(DOC_ID)REFERENCES DOCTOR);   INSERT INTO DOCTOR VALUES(432, 'Harrison' , TO_DATE('05-DEC-94'), 12000,'Pediatrics', 100, 75, 4500);INSERT INTO DOCTOR VALUES(509, 'Vester' , TO_DATE('09-JAN-00'), 8100,'Pediatrics', 432, 40, null);INSERT INTO DOCTOR VALUES(389, 'Lewis' , TO_DATE('21-JAN-96'), 10000,'Pediatrics', 432, 40, 2250);INSERT INTO DOCTOR VALUES(504, 'Cotner' , TO_DATE('16-JUN-98'), 11500,'Neurology', 289, 85, 7500);INSERT INTO DOCTOR VALUES(235, 'Smith' ,…

Chapter 4 Solutions

Oracle 12c: SQL

Knowledge Booster
Background pattern image
Computer Science
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
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning
dml in sql with examples; Author: Education 4u;https://www.youtube.com/watch?v=WvOseanUdk4;License: Standard YouTube License, CC-BY