how can you access index
Answers were Sorted based on User's Feedback
Answer / mani
After creating index by using CREATE command
CREATE UNIQUE INDEX IDX_EMP ON EMPLOYEE(EMP_ID)
To retreive index:
SELECT INDEX_NAME FROM USER_INDEX WHERE TBNAME='EMPLOYEE'
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / pandu
first of all create index
create index<indexname> on <tablename>(<columnname>);
after that we have to access to that by
Select * from <indexname>
Correct me is am i wrong...
Thank You.
Is This Answer Correct ? | 5 Yes | 3 No |
Answer / ashok kumar
we generally use the folling query for create index
CREAT INDEX <index name> on <table name>(cols1,cols2,...)
for accessing columes :
SELECT ENAME FROM EMP
WHERE cols1 and cols2
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / raghu
first we have to def indexs.
select indexname from sysibm.sysindexs where tbname = tablename
Is This Answer Correct ? | 1 Yes | 0 No |
How to rename a table in DB2 ?
For update of a row in cursors, when do we move value into host variable in cobol progrm? is it before open or before fetch ?
What is clone table?
What is a db2 cursor?
How to see the structure of db2 table??
What are concurrency issues?
What is lock contention?
How to check table size in db2 sap?
How to solve S0C7 abend with out using DISPlay in 10 mins?
In a DB2-CICS program which is acts as co-ordinator and which is participant?
In a Cobol-DB2 program, I am fetching rows from 4 tables using cursor and then based on the a field present in that table, It processes the information accordingly..for example stat-c is one digit field..if stat-c is 'D' then the a row is deleted from table and written those details in to a file. If the stat-c is 'U' then a row is updated (hardcoded what to update)in a table and written those details in to a file. If the stat-c is 'I' then a row is inserted in a table and written those details in to two files. The issue is i have to include the intermediate commits. When an abend occurs, due to commit statement db2 tables will be saved, But there will be lose of file contents. When we resubmitting the job associated with this program there will be insert ,update and delete anomolies to avoid that what measures could be taken?. The intermediate commit is nothing but issuing commit after massive inserts, updates and deletes(sum of 500actions)
4. A DB2 application is bound with uncommitted Read isolation level.It issues a request that retrieves 20 rows out of 200000 in the table. Which of the following descrbes the rows that are locked as a result of this request? a. None of the rows are locked. B.The retrieved rows are locked. C.The last row of the result set is locked. D.The rows not previously updated by another application are locked.