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

Create a sql database, The requirements as follows: Create a folder call...

The requirements as follows: Create a folder called "SECURITY" on the server and upload all your project files to that folder. Please note, the "SECURITY" folder is NOT to be IN

Pl/sql expressions , Pl/SQL Expressions The Expressions are constructed...

Pl/SQL Expressions The Expressions are constructed by using the operands and operators. An operand is a constant, literal, variable, or function call which contributes a value

Exit-when - iterative control, EXIT-WHEN The EXIT-WHEN statement permits...

EXIT-WHEN The EXIT-WHEN statement permits a loop to complete conditionally. Whenever the EXIT statement is encountered, the condition in the WHEN clause is computed. When the co

Procedure, 1. Create a procedure called TAX_COST_SP to accomplish the tax c...

1. Create a procedure called TAX_COST_SP to accomplish the tax calculation task. Keep in mind that the state and subtotal values are inputs into the procedure and the procedure is

Creating a sql file, Creating a SQL file 1. Open a new file in Notepad...

Creating a SQL file 1. Open a new file in Notepad++ and save it to the location c:\mysql\bin, with the name lab8script.sql (the file extension should be .sql ). Add a MySQL co

Declaring cursor variables, Declaring Cursor Variables Once a REF CURS...

Declaring Cursor Variables Once a REF CURSOR type is define by you, and then you can declare the cursor variables of that type in any PL/SQL block or subprogram. In the exampl

Procedures - syntax, Procedures The procedure is a subprogram which can...

Procedures The procedure is a subprogram which can take parameters and be invoked. Normally, you can use a procedure to perform an action. The procedure has 2 sections: the spe

Creating Views, Create a view named CustomerAddresses that shows the shippi...

Create a view named CustomerAddresses that shows the shipping and billing addresses for each customer in the MyGuitarShop database. This view should return these columns from the

Collection methods in pl sql, Collection Methods:   The collection me...

Collection Methods:   The collection method is a built-in function or procedure which operates on the collections and is called using the dot notation. The methods like the C

Parameter and keyword description - insert statement, Parameter and Keyword...

Parameter and Keyword Description:   table_reference: This identifies a table or view which should be available when you execute the INSERT statement, and for that you sho

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