Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
Can DML Statements Be Used in PL/SQL
Can DML Statements Be Used in PL/SQL? - Oracle DBA FAQ - Working with Database Objects in PL/SQL
✍: FYIcenter.com
Yes, you can run almost any DML statements in PL/SQL directly. To manipulate Oracle database data you can include INSERT, UPDATE, and DELETE statements, directly in PL/SQL programs, without any special notation, as shown in the following sample code:
(Connect to XE with SQL*Plus)
CREATE TABLE student (id NUMBER(5) PRIMARY KEY,
first_name VARCHAR(80) NOT NULL,
last_name VARCHAR(80) NOT NULL);
Table created.
SELECT COUNT(*) FROM student;
COUNT(*)
----------
0
CREATE OR REPLACE PROCEDURE HELLO AS
BEGIN
INSERT INTO student VALUES(29, 'Bob', 'Henry');
INSERT INTO student VALUES(30, 'Joe', 'Bush');
UPDATE student SET first_name = 'Fyi' WHERE id = 30;
DELETE FROM student WHERE id = 29;
END;
/
SELECT * FROM student;
ID FIRST_NAME LAST_NAME
-------- ----------- ----------
30 Fyi Bush
2007-04-28, 4760👍, 0💬
Popular Posts:
What Happens to Indexes If You Drop a Table? - Oracle DBA FAQ - Managing Oracle Table Indexes If you...
Where are cookies actually stored on the hard disk? This depends on the user's browser and OS. In th...
How To Set Background to Transparent or Non-transparent? - CSS Tutorials - HTML Formatting Model: Bl...
From performance point of view how do they rate ? Repeater is fastest followed by Datalist and final...
Regarding C Coding Given: Line in file Contents 30 int * someIDs, theFirst, *r; 110 someIDs =GetSome...