Question

Can we execute two SQL Statement with the same Execute immediate

Can we execute two SQL Statement with the same Execute immediate

Homework Answers

Answer #1

Question: Can we execute two SQL Statement with the same Execute immediate?

Answer: Yes, it is possible to execute two SQL Statement with the same Execute immediate.

Please refer to the below-provided example for more clarity.

Two separate Execute Immediate:

begin 
  EXECUTE IMMEDIATE 'UPDATE table_customer SET NAME = ''Jack'' where ROW = 3';
  EXECUTE IMMEDIATE 'UPDATE table_customer SET NAME = ''Mark'' where ROW = 4'; 
end;

Single Execute immediate:

begin 
  EXECUTE IMMEDIATE '
    begin
      UPDATE table_customer SET NAME = ''Jack'' where ROW = 3';
      UPDATE table_customer SET NAME = ''Mark'' where ROW = 4';
    end;';   
end;

Please let me know in the comments in case of any confusion. Also, please upvote if you like.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
What will happen when two processes execute wait() operation on the same semaphore at the same...
What will happen when two processes execute wait() operation on the same semaphore at the same time and wait() operation is not atomic? S=1 wait(S) S){ while (S <= 0) ; // busy wait S } Describe a scenario of context switches where two threads, T 1 and T 2 , can both enter a critical section guarded by a single mutex semaphore as a result of a lack of atomicity.
Save your select statements as a script. Place the semicolon at the end of each SQL...
Save your select statements as a script. Place the semicolon at the end of each SQL statement. Please number your select statements from 1 to 8 in your script and comment out each number. Include your name and student number as a comment at the top of your script. The name of the script has to be Assignment1_JohnSmith. Instead of JohnSmith use your First Name and Last Name. Upload your script trough Blackboard. Use SQL Developer to create the My...
Write a SQL statement to retrieve the average number of pages per category
Write a SQL statement to retrieve the average number of pages per category
write an SQL SELECT statement for retrieve the name and income of customers without charges in...
write an SQL SELECT statement for retrieve the name and income of customers without charges in january 2020
Given the following two related tables, write the SQL SELECT statement to solve the following queries...
Given the following two related tables, write the SQL SELECT statement to solve the following queries about developers (Dev) and programs (Prog). The id column in Dev and Prog is the relation between the two tables. Dev(id, name, dept, salary) Prog(id, title, language, lines, size); 1. List name of Devs who have written more than 1000 line programs 2. List title of all programs written in C++ language 3. List name of all developers who have written C++ programs
PS8 JULY 1. Log on to your Oracle ApEx account. Navigate to SQL Workshop à SQL...
PS8 JULY 1. Log on to your Oracle ApEx account. Navigate to SQL Workshop à SQL Scripts Create a SQL script called update_demo_orders that contains these update statements: update demo_orders set order_total = 200 where customer_id = 1; update demo_orders set order_total = 15 where customer_id = 2; update demo_orders set order_total = 12 where customer_id = 3; update demo_orders set order_total = 22 where customer_id = 4; update demo_orders set order_total = 32 where customer_id = 5; update demo_orders...
Class SQL performs automatically; discuss at least two risks inherent in letting SQL Server to perform...
Class SQL performs automatically; discuss at least two risks inherent in letting SQL Server to perform conversion. In your opinion what is the best approach for insuring that any data type conversion will work all the time as expected? Provide a vivid example to summarize your written detail explanation.
Write a SQL statement which joins the parts table with the supplier table and lists the...
Write a SQL statement which joins the parts table with the supplier table and lists the part_name, supplier_name for all parts in the part table. The supplier_id column in the suppliers table is the primary key in the suppliers table, and this key has been exported to the parts table where it is a foreign key. You should use an inner join for this query. Write a SQL statement which joins the parts table with the suppliers table and lists...
(((Python))) How can we use a LIST in a sequence or an IF Statement? Do we...
(((Python))) How can we use a LIST in a sequence or an IF Statement? Do we create a list, like in a Tuple, or can we ask a user for a set of items to add into our list? Give some examples if you can.
5. Suppose we have a 32-bit computer with an instruction set that supports immediate instructions as...
5. Suppose we have a 32-bit computer with an instruction set that supports immediate instructions as shown below: Opcode Source Register Destination Register immediate 6 bits 5 bits 5 bits 16 bits (a) How many registers at most does this computer have? (5%) (b) How many operations at most can this computer have? (5%) (c) What is the range of the number in the “immediate” field in 2'scomplement format? (5%)
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT