...so iv started creating the procedure but I'm stumbling on a few things:
here's what I have so far.
Code:
CREATE PROCEDURE data_entry_totals
AS
CURSOR (*cursor_name*)
SELECT * FROM (*table_name*)
WHERE (*column_name* = *column_names.attribute*);
BEGIN
FOR
I need to display the number of records in my 'purchase' table which looks like this:
Code:
create table Purchase
(
Purchase_ID NUMBER(10),
Appetizer_ID NUMBER(10),
Main_Course_ID NUMBER(10),
Dessert_ID NUMBER(10),
Drink_ID NUMBER(10),
constraint pk_Purchase_ID PRIMARY KEY(Purchase_ID));
Code:
INSERT INTO Purchase values(900, 201, 301, 401, 501);
INSERT INTO Purchase values(900, 202, 302, 402, 502);
I read somewhere that the cursor name needs to be declared before a procedure is created?
Thanks again guys!