Professional Web Applications Themes

Creating a table using the IXF file format for data exported using a SELECT * statement - IBM DB2

Hello, everyone. Which of the following is being kept in the new table? Check constraints Catalog statistics Primary key definitions Foreign key definitions I think catalog statistics is being preserved. Isn't that right? Thanks. Trent...

  1. #1

    Default Creating a table using the IXF file format for data exported using a SELECT * statement

    Hello, everyone.

    Which of the following is being kept in the new table?

    Check constraints

    Catalog statistics

    Primary key definitions

    Foreign key definitions

    I think catalog statistics is being preserved. Isn't that right?

    Thanks.

    Trent
    Trent Guest

  2. #2

    Default Re: Creating a table using the IXF file format for data exported using aSELECT * statement

    All you can grab is column defaults - see CREATE TABLE in the SQL
    REFERENCE under LIKE:

    "Thus the new table does not have any unique constraints, foreign key
    constraints, triggers, or indexes". Runstats must be issued separately
    as well (after all, CREATE LIKE doesn't bring the data with it, just the
    basic columns and defaults).

    Answers inline for DB2 v8 on Linux/Unix/Windows:

    Trent wrote:
    > Hello, everyone.
    >
    > Which of the following is being kept in the new table?
    >
    > Check constraints
    no
    >
    >
    > Catalog statistics
    no
    >
    >
    > Primary key definitions
    no
    >
    >
    > Foreign key definitions
    no
    >
    >
    > I think catalog statistics is being preserved. Isn't that right?
    no
    >
    >
    > Thanks.
    >
    > Trent
    Blair Kenneth Adamache Guest

  3. #3

    Default Re: Creating a table using the IXF file format for data exported using a SELECT * statement

    Your wording makes me believe you already read this one

    [url]http://www-3.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/v8infoce[/url]
    nter.d2w/report?target=mainFrame&fn=c0004580.htm




    Using Import to Recreate an Exported Table
    You can use the import utility to recreate a table that was saved
    through the export utility. The table must have been exported to an IXF
    file, and the SELECT statement used during the export operation must have
    met certain conditions (for example, no column names can be used in the
    SELECT clause; only select * is permitted). When creating a table from an
    IXF file, not all attributes of the original table are preserved. For
    example, referential constraints, foreign key definitions, and user-defined
    data types are not retained. The following attributes of the original table
    are retained:

    a.. Primary key name, and definition
    b.. Unique constraints names, and definitions, but not other
    types of constraints or triggers
    c.. Column information:
    a.. Column name
    b.. Column data type, including user-defined distinct types,
    which are preserved as their base type
    c.. Identity properties
    d.. Lengths (except for lob_file types)
    e.. Code page (if applicable)
    f.. DATALINK options
    g.. Identity options
    h.. Whether the column is defined as nullable or not nullable
    i.. Default values for constants, if any, but not other types
    of default values
    d.. Index information:
    a.. Index name
    b.. Index creator name
    c.. Column names, and whether each column is sorted in
    ascending, or in descending order
    d.. Whether the index is defined as unique
    e.. Whether the index is clustered
    f.. Whether the index allows reverse scans
    g.. pctfree values
    h.. minpctused values



    I tested the table recreation with a primary key index and all went well so
    i'd have to say that for
    Primary key definitions, it's a Yes.



    DB21085I Instance "DB2" uses "32" bits and DB2 code release "SQL08012" with
    level identifier "02030106".
    Informational tokens are "DB2 v8.1.2.169", "s030508", "WR21318", and FixPak
    "2".

    PM

    "Trent" <pineme> a écrit dans le message de news:
    [email]7ad7239b.0307011420.597e9d9bposting.google.com[/email]...
    > Hello, everyone.
    >
    > Which of the following is being kept in the new table?
    >
    > Check constraints
    >
    > Catalog statistics
    >
    > Primary key definitions
    >
    > Foreign key definitions
    >
    > I think catalog statistics is being preserved. Isn't that right?
    >
    > Thanks.
    >
    > Trent

    PM \(pm3iinc-nospam\) Guest

Similar Threads

  1. Replies: 0
    Last Post: June 1st, 03:15 AM
  2. Linking data, searching data, and format the data file
    By CobraC081375 in forum Macromedia Flash Data Integration
    Replies: 5
    Last Post: January 5th, 09:54 PM
  3. Format datagrid exported to Excel using external CSS?
    By Matt in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: December 19th, 07:25 PM
  4. ACT (color table) file format
    By Scott Parry in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 3
    Last Post: August 4th, 11:03 PM
  5. select statement form mutiple data sources
    By Aaron in forum ASP Database
    Replies: 2
    Last Post: July 24th, 08:23 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139