Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Posts
    87

    Thumbs up Unanswered: Autogenerated values..

    HI all,

    Is there any way to know that , which all fields in a table holds auto generated values?

    for eg:
    SQL> desc test_AUTO;
    Name Null? Type
    --------------------- -------- --------------------
    VV NUMBER(10)


    actually while inserting value to VV imj using sequence.
    Here i know that VV is autogenerated.
    But if i know only the structure of a table.How can i know that how many fields in that table holds autogenerated values??

    thanx.

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Autogenerated values..

    No, there is nothing about the data itself that will tell you that. If the table has a trigger to populate columns from a sequence, then of course you can see that. But some tables may have columns populated with values from a sequence that are supplied by the application, e.g.

    insert into t1 (id, name) values (t1seq.nextval, 'xxx');

    There is no way you can know that, other than by inspecting the application code.

  3. #3
    Join Date
    Dec 2003
    Location
    Gandhinagar India
    Posts
    22

    Exclamation Re: Autogenerated values..

    1) why would you like to know that! If you are the developer then you have full control and you already know that you are using sequences or something else and therefore you can take necessary action.

    IF there is something special to be taken care of then please give the reason that why you want to know so that we know is there an indirect way to find it. There is no direct method by which you will come to know that this column contains auto numbers.
    regards
    Originally posted by raseena
    HI all,

    Is there any way to know that , which all fields in a table holds auto generated values?

    for eg:
    SQL> desc test_AUTO;
    Name Null? Type
    --------------------- -------- --------------------
    VV NUMBER(10)


    actually while inserting value to VV imj using sequence.
    Here i know that VV is autogenerated.
    But if i know only the structure of a table.How can i know that how many fields in that table holds autogenerated values??

    thanx.

  4. #4
    Join Date
    Nov 2003
    Posts
    87

    Thumbs up

    thanx for the reply.

Posting Permissions

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