Informix

Expand all | Collapse all

external table

  • 1.  external table

    Posted Tue March 02, 2021 11:22 PM
    Hello All,


      I've to create below external table for my testing , but while using IN DBSPACE clause I'm getting syntax error.
    Please let me know , where should I use this clause?

    CREATE EXTERNAL TABLE emps_ext01 (
    emp_no INTEGER EXTERNAL char(10) ,
    emp_name CHAR(10) EXTERNAL CHAR(10))

    IN DBS031
    USING
    (
    FORMAT 'FIXED' ,
    DATAFILES
    ("DISK:/DBA/CR/nebula23/test/amit/emps_ext01.unl" )
    );


    Thanks
    Amit

    ------------------------------
    AMIT PATEL
    ------------------------------


  • 2.  RE: external table

    Posted Tue March 02, 2021 11:59 PM
    The 'in dbspace' clause is not valid and not required for external tables.

    An external table is an interface to the file(s) being referenced and does not have consume storage as would a 'real' table.  As such there is no need to locate it in a particular dbspace.

    Sent from BlueMail





  • 3.  RE: external table

    Posted Wed March 03, 2021 02:26 AM
    Hi Amit,

    IN CLAUSE is not required. because data file will have rows on the disk rather than in dbspace.
    You can refer below examples from Knowledge center:
    External Table Examples (ibm.com) 


    Regards,
    Gaurav

    ------------------------------
    Gaurav Kumar
    ------------------------------