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.
Given the following tables, there is a university rule preventing a student from enrolling in a new class if there is an unpaid fine. Please write a table-level CHECK constraint to implement the rule. */ create table Course (CourseID int primary key, CourseName varchar(50), InstructorID int, AcademicYear int, Semester smallint); create table Student (StudentID int primary key, LastName varchar (50), FirstName varchar (50), Email varchar(30), PhoneNumber varchar (20)); create table Enrollment (CourseID int references Course(CourseID), StudentID int references Student(StudentID), RegisterDate date, primary key (CourseID, StudentID)); create table Fine (StudentID int references Student(StudentID), IssueDate date, Amount money, PaidDate date primary key (StudentID, IssueDate));
True or False? An action query is accomplished by putting AS and an alternative name after the table name in the FROM clause.

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