473,399 Members | 3,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Updating and Deleting data with one statement

Hi, I'm looking to update and delete data from separate tables using only one statement (and without the use of stored procedures). For example;

DELETE a FROM table1 WHERE a = A
UPDATE table2 SET b = null WHERE b = A
DELETE c FROM table 3 WHERE c = A

Is it possible to group these are one statement? (Apologies if this is a trivial question, I am quite new to Oracle).

Thanks for your help.
Nov 14 '07 #1
3 1233
QVeen72
1,445 Expert 1GB
Hi,

Create a StoredProcedure With Parameters.
Write all the Delete/Update/Insert stuff in that SP.
Call the SP passing Appropriate parameters..

Regards
Veena
Nov 14 '07 #2
amitpatel66
2,367 Expert 2GB
Hi, I'm looking to update and delete data from separate tables using only one statement (and without the use of stored procedures). For example;

DELETE a FROM table1 WHERE a = A
UPDATE table2 SET b = null WHERE b = A
DELETE c FROM table 3 WHERE c = A

Is it possible to group these are one statement? (Apologies if this is a trivial question, I am quite new to Oracle).

Thanks for your help.
It is possible to update and delete at a same time with one statement in oracle if it is a single table.But you want to perform in multiple tables.
What you can do is place these statements in a file and save it as abc.sql.
Then call abc.sql from sqlplus and commit
Nov 14 '07 #3
debasisdas
8,127 Expert 4TB
Hi, I'm looking to update and delete data from separate tables using only one statement (and without the use of stored procedures).
That is not possible in oracle.
Nov 15 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Hennie de Nooijer | last post by:
Hi, Currently we're a building a metadatadriven datawarehouse in SQL Server 2000. We're investigating the possibility of the updating tables with enormeous number of updates and insert and the...
3
by: steve | last post by:
Hello, I am trying to take all the data from one table and transfer it to another table with exactly the same column names in the same database. I have done this with a small sql script in an...
5
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated...
3
by: | last post by:
Hello, I have created an ASP.NET 2.0 application that utilized a Gridview Control to display and update/delete data. The problem I am having is that the gridview control is displaying the data...
34
by: Jeff | last post by:
For years I have been using VBA extensively for updating data to tables after processing. By this I mean if I had to do some intensive processing that resulted in data in temp tables, I would have...
3
by: adam222 | last post by:
hello, i have a web-form with a GridView control, i wanted to update & delete, using the AutoGenerateEditButton. when i used it with sqlDataSource (executing SP in the DB) it works like a...
3
by: R. Harris | last post by:
Hi. I have 2 forms: form1 form2 On Form2 I have a listbox and a button. When I click the button it calls a function from form1 and within that function it updates the listbox on form2. My...
1
by: smartchap009 | last post by:
Adding,Updating and Deleting user using perl script in linux -------------------------------------------------------------------------------- hi, If i can get help in writing perl code for...
4
by: =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?= | last post by:
I setup a simple gridview as a utility just to do some updates, nothing fancy just wanted easy UI to make updates. When I select ‘Edit’, I get the fields I want to edit. I edit them and click...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.