how to manipulate indexes?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jaanutn
    New Member
    • Mar 2008
    • 18

    how to manipulate indexes?

    [quote]

    how to maipulate index numbers which is created by index command?
    or how to retrieve the index numbers?

    [quote]
  • amitpatel66
    Recognized Expert Top Contributor
    • Mar 2007
    • 2358

    #2
    [QUOTE=jaanutn][quote]

    how to maipulate index numbers which is created by index command?
    or how to retrieve the index numbers?

    Your requirement is not clear.
    Please be more specific.

    Comment

    • jaanutn
      New Member
      • Mar 2008
      • 18

      #3
      [QUOTE=amitpatel 66][QUOTE=jaanutn]

      how to maipulate index numbers which is created by index command?
      or how to retrieve the index numbers?



      Your requirement is not clear.
      Please be more specific.

      [code]

      SQL> select * from bonus;

      ENAME JOB SAL COMM
      ---------- --------- --------- ---------
      Justin manager 12000 5
      Jane Clerk 10000 3
      Jean Atten 2000 2
      Joe Kashier 2000 3

      SQL> create index indexname on bonus(ename);

      Index created.

      [code]

      [quote]

      how can i retrieve values of indexname? can i use these index values for ny other purposes? in what way i able to manipulate these index values?
      say an example nextval & currval is used for manipulate sequence numbers

      [quote]

      Comment

      • amitpatel66
        Recognized Expert Top Contributor
        • Mar 2007
        • 2358

        #4
        Index does not have any value as such. Once creatd on any table, when you use that table in select query, the index will be used.

        you can get details of your index using the below select query:

        [code=oracle]

        select * from user_indexes where index_name = '<Your index Name>'

        [/code]

        Comment

        • smruti
          New Member
          • Mar 2008
          • 6

          #5
          [quote]

          how can i retrieve values of indexname? can i use these index values for ny other purposes? in what way i able to manipulate these index values?
          say an example nextval & currval is used for manipulate sequence numbers

          Try to run this
          [code=oracle]

          SELECT * FROM user_indexes WHERE index_name = 'xyz'

          [/code]


          Hope it will fullfil ur requirements..

          Smruti: Please make use of [CODE] TAGS when ever you post any source code in this forum. Using CODE TAGS increases the readability and clarity of the source code. For more on posting guidelines, please check http://www.thescripts.com/forum/faq....ing_guidelines
          Last edited by amitpatel66; Mar 18 '08, 11:56 AM. Reason: code tags

          Comment

          Working...