Query, PL-SQL Programming

Assignment Help:
ALTER TABLE bb_basketitem
ADD CONSTRAINT bitems_qty_ck CHECK (quantity < 20);

BEGIN
INSERT INTO bb_basketitem
VALUES (88,8,10.8,21,16,2,3);
END;
Brewbean’s wants to add a check constraint on the QUANTITY column of the
BB_BASKETITEM table. If a shopper enters a quantity value greater than 20 for an item,
Brewbean’s wants to display the message “Check Quantity” onscreen. Using a text editor, open
the assignment04-06.txt file in the Chapter04 folder. The first statement, ALTER TABLE,
must be executed to add the check constraint. The next item is a PL/SQL block containing an
INSERT action that tests this check constraint. Add code to this block to trap the check
constraint violation and display the message.

Related Discussions:- Query

Dynamic sql - pl sql, Dynamic SQL: The Most PL/SQL programs do a predi...

Dynamic SQL: The Most PL/SQL programs do a predictable, specific job. For illustration, a stored procedure may accept an employee number and salary increase, and then update t

Seeking a programmer to design a legal document, Seeking a programmer to de...

Seeking a programmer to design a legal document with pre-existing fields that could allow the auto-population of client(s) information (i.e. Name, Account Number, Address etc.) int

Advantages of exceptions, Advantages of Exceptions Using the exception...

Advantages of Exceptions Using the exceptions for the error handling has many benefits. Without an exception handling, every time you issue a command, you should ensure for th

Example of check constraints - sql, Example of Check Constraints Examp...

Example of Check Constraints Example: Workaround for when subqueries not permitted in CHECK constraints CREATE FUNCTION NO_MORE_THAN_20000_ENROLMENTS ( ) RETURNS BOOLEAN

Explicitly specifying the join condition - sql, Explicitly specifying the j...

Explicitly specifying the join condition - SQL SELECT * FROM IS_CALLED JOIN IS_ENROLLED_ON ON ( IS_CALLED.StudentId = IS_ENROLLED_ON.StudentId ) Now, the key word JO

Anatomy of a command, Anatomy of a Command Figure, showing a simple S...

Anatomy of a Command Figure, showing a simple SQL command, is almost identical to its counterpart in the theory book. The only difference arises from the fact that SQL uses a

Grouping and ungrouping in sql, Grouping and Ungrouping in SQL Example...

Grouping and Ungrouping in SQL Example specifying EXAM_MARK in place of COURSE in the main FROM clause. Example: Obtaining C_ER2 from EXAM_MARK SELECT CourseId, CAST

Homework, What are the rates for help in writing PL/SQL procedures and func...

What are the rates for help in writing PL/SQL procedures and functions?

Using default-declarations in sql, Using DEFAULT You can use the keyword...

Using DEFAULT You can use the keyword DEFAULT rather than that of the assignment operator to initialize the variables. For e.g. the declaration blood_type CHAR := ’O’; it can b

Write a program, to write a heap sort program usin pl-sql

to write a heap sort program usin pl-sql

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd