Oracle PL/SQL
Using Dynamic SQL to create a procedure named add_row_sp for inserting a row into a table with three columns: add_rows (p_table_name VARCHAR2, p_column1 NUMBER, p_column2 VARCHAR2, p_column3 NUMBER). Testing the procedure by using the following block to add a record to the BB_TAX table:
BEGIN
add_row_sp ('BB_TAX', 4, 'SD', 0.02);
END;
ORACLE Stored Procedure:
create or replace procedure "ADD_ROW_SP" (p_table_name VARCHAR2,
p_column1 NUMBER, p_column2 VARCHAR2, p_column3 NUMBER)
is
begin
execute immediate
'insert into '||p_table_name ||' values(:1, :2, :3) ' using
p_column1, p_column2, p_column3;
end;
________________________________________________________________________________________________


Oracle PL/SQL Using Dynamic SQL to create a procedure named add_row_sp for inserting a row into...
oracle 11g 2nd edition pl/sql Assignment 5-10: Returning a Record Create a procedure named DDPROJ_SP that retrieves project information for a specific project based on a project ID. The procedure should have two parameters: one to accept a project ID value and another to return all data for the specified project. Use a record variable to have the procedure return all database column values for the selected project. Test the procedure with an anonymous block.
PL/SQL Auction Program 1. Create a user xyz, who is the owner of the auction. Create the schema, and package. 2. Create users x1 and x2 who are the participants in the auction. They will need acces to the package. 3. Bid on the same item and record your observations. Verify all scenarios. Upload the files with the missing code and a detailed sample run. AUCTION OWNER.TXT SQL> conn / as sysdba Connected. SQL> drop user xyz cascade; User dropped....
1.Write a pl/SQL block that selects all the rows from the A2order table and prints them to screen. THIS CAN BE EASILY DONE USING AGGREGATE FUNCTIONS, BUT YOU MUST NOT USE AGGREGATE FUNCTIONS IN THIS ASSIGNMENT 2. 2.Write a pl/sql block that deletes the orders from the A2order table that were ordered after the order that has the highest order_price (Order_date will tell you when a row was entered). YOU MUST USE BULK OPERATIONS FOR THIS CODE 3. Write a...
Oracle 11g PL/SQL Programming Sometimes Brewbean’s customers mistakenly leave an item out of a basket that’s already been checked out, so they create a new basket containing the missing items. However, they request that the baskets be combined so that they aren’t charged extra shipping. An application page has been developed that enables employees to change the basket ID of items in the BB_BASKETITEM table to another existing basket’s ID to combine the baskets. A block has been constructed to...
Create a PL/SQL procedure that takes department ID as an input and prints the details of all the students including the Student ID (represented as StuID), name, and the description of the major that they are currently enrolled in. You may use the following procedure template: CREATE OR REPLACE PROCEDURE Student_Major (I_deptID IN Student.DeptID%type) AS CURSOR c1 is ... ... BEGIN ... END Student_Major;
In oracle sql, how do I add "not null constraint" at end of create table block and give it a name without using the CHECK constraint? Is it e.g., CONSTRAINT constraintName NOT NULL If so, then how does the statement know which columnName I'm referring to to make NOT NULL? I know that I can do this after declaring the column, what I'm wondering about is how to do this after declaring all the columns.
In oracle pl/sql do not copy and paste from another answered question. Create a common user c##admin query you used to create the user screenshots to prove that user was created, can connect and can create tables and insert data. Use system account to create a table TEST_TABLE_SYSTEM with at least one column and add at least one row. Do not forget to commit. query you used to create the table screenshots to show the content As c##admin try to...
Please write SQL Query for following questions using Northwind Database: 1. Create a procedure to add a new record to Territories table. Call it NewTerr. Add the following records using the procedure. TerritoryID TerritoryDescription Region 88888 Brooklyn 1 99999 Waco 4 77777 Long Beach 2 2. Create an Update Procedure that will change the Region from 1 to 3 for record with TerritoryID 88888. Call it Update88. 3. Create a Delete Procedure that will delete the one record from...
I am supposed to create the code in SQL for the 3
Triggers using the information on the table below.
13.. Assume the Branch table contains a column called ?Total value that-represents the -total price. for all books.at -that branch. Following ?the style shown in-the text, write the code for the following-triggers. a.-When ?inserting a row in the Copy table, -add -the price -to the -total -value for the appropriate branch . b. When-updating -a -row in-the Copy table, .add-the-difference...
Write PL/SQL Procedure that returns the names of people who spent over $100. Create table Resturauntorder ( resturauntorder_id int, resturaunt_name varchar2(50), hotel_name varchar2(50), customer_name varchar2(50), order_date date, items_orderd varchar2(100), order_total decimal(5,2), payment_type varchar2(50), tip_amount decimal(5,2), primary key(resturauntorder_id) ); Insert into Resturauntorder values (123,'Terrace Restaurant', 'Hilton Palm Springs', 'John Smith', date '2019-01-10', 'Omelet Pan, Cinnamon French Toast, California eggs, Orange Juice', 60.49, 'cash', 10.33); Insert into Resturauntorder values (345,'Spiaggia', 'Hilton Chicago/Magnificent Mile Suite','Ashley Scott', date '2019-02-21', 'Polpo, Tonno Vitellato, Rabarbaro', 189.29,...