INSERTING DATA CONTAINING APOSTROPHES : INSERT Column Name « Insert Delete Update « Oracle PL / SQL






INSERTING DATA CONTAINING APOSTROPHES

 
SQL>
SQL> CREATE TABLE purchase (
  2       product_name  VARCHAR2(25) NOT NULL,
  3       product_price NUMBER(4,2)  NOT NULL,
  4       purchase_date DATE
  5       );

Table created.

SQL>
SQL>
SQL> SET SCAN OFF
SQL>
SQL> INSERT INTO purchase VALUES ('Fifth Product''s Name', 25, '05-MAY-03');

1 row created.

SQL>
SQL> SET SCAN ON
SQL>
SQL>
SQL> SELECT * FROM purchase;

PRODUCT_NAME              PRODUCT_PRICE PURCHASE_
------------------------- ------------- ---------
Fifth Product's Name                 25 05-MAY-03

1 row selected.

SQL>
SQL> DROP TABLE purchase;

Table dropped.

SQL>

 








Related examples in the same category

1.Using the column list in INSERT command, include a column list after the table name.
2.The order of values in the VALUES clause matches the order in which the columns are specified in the column list
3.Specifying a Null Value for a Column
4.Including Double Quotes in a Column Value
5.SELECT SPECIFIC COLUMNS
6.Changing column order
7.Use quotation in insert statement in PL/SQL