- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How will you find out all the indexes which are built in a particular DB2 table?
The DB2 indexes are used to increase the query performance and speed up the query result. There can be multiple indexes built on a single table and DB2 optimizer chooses different indexes based on the predicate used in the WHERE clause to fetch the query result.
In order to find out all the indexes which are built on a particular table we will use the DB2 system table SYSIBM.SYSINDEXES. This table records all the details related to indexes. Following SQL query can be used on this table to get the desired result.
SELECT NAME, TBNAME FROM SYSIBM.SYSINDEXES WHERE TBNAME = ‘’
The NAME column indicates the name of the index and TBNAME column indicates the name of the table.
- How to find out all the indexes for a DB2 table TAB1?
- Write a DB2 query to find out all the duplicate INVOICE_ID in ORDERS DB2 table?
- How can you revert all the DB2 table changes done in a COBOL-DB2 program?
- How will you extract multiple rows from a DB2 table in a single FETCH call?
- How will you find the ORDER_ID of all the orders having ORDER_TOTAL greater than the average of ORDER_TOTAL in ORDER's DB2 table
- How will you create a new TRIGGER on the ORDERS DB2 table? Give the syntax of TRIGGER
- How to find all the foreign keys of a DB2 table TAB1?
- How to find out the PLANS which will be impacted if a index is dropped?
- How can we find out the storage engine used for a particular table in MySQL?
- How will you get all the options in a static dropdown?
- How we can find all the triggers associated with a particular MySQL table?
- How will you keep the CURSOR open after firing COMMIT in a COBOL-DB2 program?
- How will you add a constraint on above DB2 table TAB1 for ages between 3 to 16 years?
- How to store a NULL value in a particular column of a DB2 table using COBOL-DB2 program?
- How to get the list of all COBOL-DB2 programs using a DB2 table TAB1?