Use PL/SQL to insert data to table : Insert « PL SQL Programming « Oracle PL/SQL Tutorial






SQL>
SQL> CREATE TABLE department (
  2  dept_id           INTEGER,
  3  dept_name     VARCHAR2(32));

Table created.

SQL>
SQL>
SQL> BEGIN
  2  INSERT into department (dept_id, dept_name)values (1,'dept_name');
  3  END;
  4  /

PL/SQL procedure successfully completed.

SQL>
SQL> select * from department;


   DEPT_ID DEPT_NAME
---------- --------------------------------
         1 dept_name

SQL> drop table department;

Table dropped.

SQL>
SQL>








24.10.Insert
24.10.1.Use PL/SQL to insert data to table
24.10.2.Insert data in PL/SQL block
24.10.3.How INSERTs work with PL/SQL
24.10.4.Use Declared variables in SQL statements
24.10.5.Use LOOP to insert data to a table with loop counter variable
24.10.6.Add a row to the classes table, using the values of the variables
24.10.7.Use PL/SQL variables with insert statement
24.10.8.A Safe INSERT Statement
24.10.9.Insert by Using RECORD Type Variable
24.10.10.Insert values using PL/SQL literals and variables
24.10.11.Insert value to product and productcategory with stored procedure