LispWorks User Guide and Reference Manual > 19 Common SQL > 19.11 Oracle LOB interface > 19.11.1 Introduction

NextPrevUpTopContentsIndex

19.11.1.3 Inserting empty LOBs

To add a new LOB object to the database, you must insert an empty LOB. The preferred way of doing this is to use the Oracle SQL functions EMPTY_BLOB and EMPTY_CLOB, which can called by using the pseudo operator sql-function , like this:

(sql:insert-records :into [mytable]
                    :values 
                    (list "name" [sql-function 'empty_blob]))

This code inserts a record with "name" and an empty BLOB. It is also possible to make an empty LOB by calling ora-lob-create-empty, and passing the empty LOB as a value to insert-records or update-records.


LispWorks User Guide and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex