Re: Setting maximum size of a blob data type

  • From: "David Fitzjarrell" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "oratune@xxxxxxxxx" for DMARC)
  • To: "kibeha@xxxxxxxxx" <kibeha@xxxxxxxxx>, "JBECKSTROM@xxxxxxxxx" <JBECKSTROM@xxxxxxxxx>
  • Date: Wed, 17 Sep 2014 08:10:24 -0700

That won't work as you cannot call dbms_lob.getlength in a CHECK constraint:

SQL> create table temp_photo
  2   (
  3   ID    NUMBER(3)     NOT NULL,
  4   PHOTO_NAME         VARCHAR2(50),
  5   PHOTO       BLOB check(dbms_lob.getlength(photo) < 4097)
  6   );
 PHOTO    BLOB check(dbms_lob.getlength(photo) < 4097)
                     *
ERROR at line 5:
ORA-00904: "DBMS_LOB"."GETLENGTH": invalid identifier


SQL>

It was a good thought.

 
David Fitzjarrell

Principal author, "Oracle Exadata Survival Guide"



On Wednesday, September 17, 2014 8:12 AM, Kim Berg Hansen <kibeha@xxxxxxxxx> 
wrote:
 


Set a CHECK constraint on the length?




Regards


Kim Berg Hansen

http://dspsd.blogspot.com
kibeha@xxxxxxxxx
@kibeha



On Wed, Sep 17, 2014 at 4:01 PM, Jeffrey Beckstrom <JBECKSTROM@xxxxxxxxx> wrote:

Is it possible to set a maximum size for a blob data type column?
>
>
>Jeffrey Beckstrom
>Lead Database Administrator
>Information Technology Department
>Greater Cleveland Regional Transit Authority
>1240 W. 6th Street
>Cleveland, Ohio 44113
>.

Other related posts: