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 20MC

Which of the following is the valid syntax for adding a PRIMARY KEY constraint to an existing table?

  1. a. ALTER TABLE tablename ADD CONSTRAINT PRIMARY KEY (columnname);
  2. b. ALTER TABLE tablename ADD CONSTRAINT (columnname) PRIMARY KEY constraintname;
  3. c. ALTER TABLE tablename ADD [CONSTRAINT constraintname] PRIMARY KEY;
  4. d. None of the above is valid syntax.
Blurred answer
Students have asked these similar questions
Which of the following is the valid syntax for adding a PRIMARY KEY constraint to an existing table? ( refer to the tables in the JustLee Books database).                                                                                                           a. ALTER TABLE tablename ADD CONSTRAINT PRIMARY KEY (columnname); b. ALTER TABLE tablename ADD CONSTRAINT (columnname) PRIMARY KEY constraintname;                                                                                                  c. ALTER TABLE tablename ADD [CONSTRAINT constraintname] PRIMARY KEY; d. None of the above is valid syntax.
PLZ help with the following: Complete the following query Using this table which you can change to solve the problem. Create table book (title INT, year INT, num INT, subject Varchar); Create table client (CID int,fname varchar(20)lname varchar(10),type varchar(6)); Create table author (year INT, ID INT, fname varchar,lname varchar(10); The question is bellow 1.Solve the following: Choose appropriate data types for each attribute and include primary key and foreign key constraints, Check and Not Null constraints and make the the primary key are : num, Id, cid. The problem is below The faculty and students (we refer to them in our system as clients) can electronically check out any book at any time. A book must have at least one author but can have more authors. An author must have written at least one book or more to be included in the system. A book may have never been checked out, but can be checked out many times by the same client or different clients over time. A client may have…
Please written by computer source Create a table with two columns. Name the table First Initial _ Last Name (e.g. John Dow will create table j_dow). You have to audit all DML statements on your table. To do this you write two triggers: 1. To log any DML statements that users might run on this table. The results must be stored in the First Initial _ Last Name _ Log table (e.g. John Dow will create table j_dow_log). The table should have unique event ID, values for both the Oracle and the system user who ran the query, the time it was executed and the type of DML query user ran. 2. To capture any data that was changed in the table. The results must be stored in the First Initial _ Last Name _ History table (e.g. John Dow will create table j_dow_history). The table should reference the event ID from the log table, and store both old and new values for both columns. What to submit: Name this file according to submission guidelines and include the following answers: Code to create all three…

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
Text book image
CMPTR
Computer Science
ISBN:9781337681872
Author:PINARD
Publisher:Cengage
dml in sql with examples; Author: Education 4u;https://www.youtube.com/watch?v=WvOseanUdk4;License: Standard YouTube License, CC-BY