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

Videos

Textbook Question
Book Icon
Chapter 4, Problem 3MC

Which of the following SQL statements is invalid and returns an error message?

  1. a. ALTER TABLE books ADD CONSTRAINT books_pubid_uk UNIQUE (pubid);
  2. b. ALTER TABLE books ADD CONSTRAINT books_pubid_pk PRIMARY KEY (pubid);
  3. c. ALTER TABLE books ADD CONSTRAINT books_pubid_nn NOT NULL (pubid);
  4. d. ALTER TABLE books ADD CONSTRAINT books_pubid_fk FOREIGN KEY (pubid) REFERENCES publisher (pubid);
  5. e. All of the above statements are invalid.
Blurred answer
Students have asked these similar questions
Draw the ERD rI : ithat is implemented by the following SQL code: CREATE TABLE PROJ_USER USER_ID NUMBER NOT NULL, USER_NAME VARCHAR2(50) NOT NULL, USER_EMAIL VARCHAR2(50) NOT NULL, CONSTRAINT USER_PK PRIMARY KEY (USER_ID) ); CREATE TABLE PROJ_CERTIFIEDUSER USER_ID NUMBER NOT NULL, CUSER_REALNAME VARCHAR2(50) NOT NULL, CUSER_CERTIFICATION VARCHAR2(50) NOT NULL, CONSTRAINT CERTIFIEDUSER_PK PRIMARY KEY (USER_ID), CONSTRAINT CERTIFIEDUSER_FK FOREIGN KEY (USER_ID) REFERENCES PROJ_USER (USER_ID) );
Draw the ERD that is implemented by the following SQL code: CREATE TABLE PROJ_USER USER_ID NUMBER NOT NULL, USER_NAME VARCHAR2(50) NOT NULL, USER_EMAIL VARCHAR2(50) NOT NULL, CONSTRAINT USER_PK PRIMARY KEY (USER_ID) ); CREATE TABLE PROJ_CERTIFIEDUSER USER_ID NUMBER NOT NULL, CUSER_REALNAME VARCHAR2(50) NOT NULL, CUSER_CERTIFICATION VARCHAR2(50) NOT NULL, CONSTRAINT CERTIFIEDUSER_PK PRIMARY KEY (USER_ID), CONSTRAINT CERTIFIEDUSER_FK FOREIGN KEY (USER_ID) REFERENCES PROJ_USER (USER_ID) );
THIS MODULE IS ABOUT SUBQUERIES, SO YOU MUST USE SUBQUERIES INSTEAD OF TABLE JOINS  (a) From which two fields in which table can you calculate the enrollment of a section?(b) From which table can you get both course and section numbers?(c) Which field in table SECTION uniquely identifies a section, section id or section no?(d) Write a SQL statement to show sections and their enrollment.(e) Write a SQL statement to show sections with enrollment greater than five. Display both course andsection numbers

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
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
How to Design DB Tables for any Application? (The Basics); Author: Studytonight;https://www.youtube.com/watch?v=XUdNVaSikqY;License: Standard YouTube License, CC-BY
Create a Table (Introduction to Oracle SQL); Author: Database Star;https://www.youtube.com/watch?v=BiV1IrzB1sY;License: Standard Youtube License