Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 4, Problem 9RQ
What is the difference between disabling a constraint and dropping a constraint?
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
What happens when a constraint is followed? Unique I Primary Key (ii), Default (iii), and Check (iv) Unique I Primary Key (ii), Default (iii), and Check (iv)
What is the difference between disabling a constraint and dropping a constraint? ( refer to the tables in the JustLee Books database).
( Please answer this question immediately I do not have time )
Use the following table to answer the questions below:
Table name: Books
Column Name
Role
Data Type
Length
Constraint
bookID
Stores the ID of a book
Number
5
Primary key
bookTitle
Stores the title of a book
Varchar2
50
-
bookISBN
Stores the ISBN of a book
Number
13
Cannot be null and duplicated
publicationDate
Store the publication date of a book
Date
-
Cannot be null
bookPrice
Stores the price of a book
Number
2,2
Cannot be null
a. Write in SQL a command that creates the table Books according to the above description
b. Write in SQL a statement that adds a new column named publisherID of type Char(10). This column should be defined as a foreign key that relates the table Books to the table Publisher
c. Write in SQL a command that deletes the books that are published before 20-Aug-2010
d. Write a SQL query that displays the number of books that are published in the year 2018
e. Write in SQL a…
Chapter 4 Solutions
Oracle 12c: SQL
Ch. 4 - What is the difference between a PRIMARY KEY...Ch. 4 - How can you verify the constraints that exist for...Ch. 4 - A table can have a maximum of how many PRIMARY KEY...Ch. 4 - Which type of constraint can be used to make...Ch. 4 - Which type of constraint should you use to ensure...Ch. 4 - How is adding a NOT NULL constraint to an existing...Ch. 4 - When must you define constraints at the table...Ch. 4 - Prob. 8RQCh. 4 - What is the difference between disabling a...Ch. 4 - Prob. 10RQ
Ch. 4 - Prob. 1MCCh. 4 - Which of the following is not a valid constraint...Ch. 4 - Which of the following SQL statements is invalid...Ch. 4 - What is the maximum number of PRIMARY KEY...Ch. 4 - Prob. 5MCCh. 4 - How many NOT NULL constraints can be created at...Ch. 4 - The FOREIGN KEY constraint should be added to...Ch. 4 - What is the maximum number of columns you can...Ch. 4 - Which of the following commands can you use to...Ch. 4 - Prob. 10MCCh. 4 - In the initial creation of a table, if a UNIQUE...Ch. 4 - Which type of constraint should you use on a...Ch. 4 - Which of the following commands can be used to...Ch. 4 - Which of the following keywords allows the user to...Ch. 4 - Which of the following data dictionary objects...Ch. 4 - Which of the following types of constraints cant...Ch. 4 - Suppose you created a PRIMARY KEY constraint at...Ch. 4 - You’re creating a new table consisting of three...Ch. 4 - Which of the following types of restrictions can...Ch. 4 - Which of the following is the valid syntax for...Ch. 4 - Prob. 1HOACh. 4 - Prob. 2HOACh. 4 - Prob. 3HOACh. 4 - Add a column named Base_salary with a datatype of...Ch. 4 - Create a table named BOOK_STORES to include the...Ch. 4 - Add a constraint to make sure the Rep_ID value...Ch. 4 - Change the constraint created in Assignment #6 so...Ch. 4 - Create a table named REP_CONTRACTS containing the...Ch. 4 - Produce a list of information about all existing...Ch. 4 - Issue the commands to disable and then enable the...
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 commands can you use to rename a constraint? RENAME ALTER CONSTRAINT MOVE NEW NAME None of the above commands can be used.arrow_forwardWhich of the following is not a valid constraint type? a. PRIMARY KEYS b. UNIQUE c. CHECK d. FOREIGN KEYarrow_forwardWhich of the following types of constraints cant be created at the table level? a. NOT NULL b. PRIMARY KEY c. CHECK d. FOREIGN KEY e. None of the above constraints can be created at the table level.arrow_forward
- Which type of constraint can be used to make certain the category for a book is included when a new book is added to inventory?arrow_forwardWhat is the difference between a PRIMARY KEY constraint and a UNIQUE constraint?arrow_forwardSuppose you created a PRIMARY KEY constraint at the same time you created a table and later decide to name the constraint. Which of the following commands can you use to change the constraint’s name? ALTER TABLE … MODIFY ALTER TABLE … ADD ALTER TABLE … DISABLE None of the above commands can be used.arrow_forward
- Which of the following commands can be used to enable a disabled constraint? a. ALTER TABLE MODIFY b. ALTER TABLE ADD c. ALTER TABLE DISABLE d. ALTER TABLE ENABLEarrow_forwardWhen must you define constraints at the table level rather than the column level?arrow_forwardHow many NOT NULL constraints can be created at the table level by using the CREATE TABLE command? 0 1 12 30 255arrow_forward
- What does the funnel symbol that appears next to a field’s name in the Query Builder dialog box indicate? The field is used in a SELECT statement’s ORDER BY clause. The field is used in a SELECT statement’s WHERE clause. The field is the primary key. The field is the foreign key.arrow_forwardAn index is automatically created for a FOREIGN KEY constraint. Select one: a. True b. Falsearrow_forwardWhat does it mean to be a constraint?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
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