- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
There is a DB2 view VIEW1. How to get the definition of this view?
To get a DB2 view definition we can use the SYSIBM.SYSVIEW DB2 system table. The SYSVIEW table stores the details about all the views that exist in DB2. We can give below SQL statement to find the view definition.
SELECT NAME, SEQNO, TEXT FROM SYSIBM.SYSVIEWS WHERE NAME = ‘VIEW1’ ORDER BY SEQNO;
The VIEW can have definitions in multiple lines denoted by the SEQNO. That is the reason we need to use ORDER BY SEQNO so as to give the view definition in correct order. The exact definition is available in the TEXT column.
Advertisements