Scalable Database Server, HiRDB Version 8 Description
Data insertion is the process of inserting rows into a table. The data insertion methods and an example of specifying SQL statements are shown as follows.
- Data insertion methods
- The INSERT statement is used to insert rows. The following two methods are available for inserting rows into a table:
- Inserting rows by column
- Inserting rows by row (specify ROW in the INSERT statement)
- Data insertion SQL specification example
- An example of inserting rows by column is explained as follows.
- Example
- In this example, the INSERT statement inserts in each column of the stock table (STOCK) the values set in embedded variables (:ZPCODE, :ZPNAME, :ZCOLOR, :ZPRICE, and :ZSQUANTITY) that are used for transferring values between a table and UAPs:
INSERT INTO STOCK (PCODE,PNAME,COLOR,PRICE,SQUANTITY)
VALUES(:ZPCODE,:ZPNAME,:ZCOLOR,:ZPRICE,:ZSQUANTITY)
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.