Cursor

db2 interview questions

db2 interview questions

Basic Interview Questions

  1. Does DB2 use SQL?
  2. What is cursor in DB2?
  3. What does a positive Sqlcode indicates?
  4. What is DB2 bind process?
  5. What is difference between SQL and Db2?
  6. What is difference between Db2 and Oracle?
  7. Which one best describes why cursor is used?
  8. What is the difference between cursor and select statement?
  9. What are scrollable cursors and how useful are these?
  10. What does Sqlcode =- 206 mean?
  11. What is SQL coding?
  12. What is Sqlca in DB2?

Does DB2 use SQL?

Db2 for z/OS® is developed based on industry SQL standards.

What is cursor in DB2?

Db2 has a mechanism called a cursor . ... In Db2, an application program uses a cursor to point to one or more rows in a set of rows that are retrieved from a table. You can also use a cursor to retrieve rows from a result set that is returned by a stored procedure.

What does a positive Sqlcode indicates?

Negative values indicate an unsuccessful execution with an error. An example is -911, which means that a timeout has occurred with a rollback. Positive value mean a successful execution with a warning. An example is +100, which means that no matching rows were found or that the cursor has reached the end of the table.

What is DB2 bind process?

The bind process establishes a relationship between an application program and its relational data. This process is necessary before you can execute your program. During the precompilation process, the DB2® precompiler produces both modified source code and a database request module (DBRM) for each application program.

What is difference between SQL and Db2?

SQL Server provides a Graphical User Interface to Perform Various operations on the Database. The GUI makes it easy to work with the database. ... It is to be noted that DB2 also Provides the GUI. The License of Oracle and DB2, for only 10 Users, requires 2 Lakhs, whereas SQL Server requires approx.

What is difference between Db2 and Oracle?

Db2 is well known for reliability and scalability, while Oracle Database is more known for its wide range of applications, tools, skills, and partners available. Both are very stable databases, with large amounts of documentation and good support.

Which one best describes why cursor is used?

Cursors are used by database programmers to process individual rows returned by database system queries. Cursors enable manipulation of whole result sets at once. In this scenario, a cursor enables the sequential processing of rows in a result set.

What is the difference between cursor and select statement?

In embedded sql which is written within COBOL-DB2 program, SELECT statement can retrieve only one row at a time. So inorder to multiple rows we make use of cursor which retrieves multiple rows from a table. Select * can be given in SPUFI to retrieve all the rows in the table.

What are scrollable cursors and how useful are these?

Scrollable cursors allow developers to move through the results of a query in multiple ways. ... BEFORE – positions the cursor before the first row of the results set. AFTER – positions the cursor after the last row of the results set. ABSOLUTE n– will FETCH the row that is n rows away from the first row in the results set.

What does Sqlcode =- 206 mean?

-206 object-name IS NOT VALID IN THE CONTEXT WHERE IT IS USED.

What is SQL coding?

SQL, Structured Query Language, is a programming language designed to manage data stored in relational databases. SQL operates through simple, declarative statements. This keeps data accurate and secure, and it helps maintain the integrity of databases, regardless of size.

What is Sqlca in DB2?

SQLCA. SQLCA is a SQL communication area through which DB2 passes the feedback of SQL execution to the program. It tells the program whether an execution was successful or not. There are a number of predefined variables under SQLCA like SQLCODE which contains the error code.

Difference Between DNA and Genes
DNA. DNA is the molecule that is the hereditary material in all living cells. Genes are made of DNA, and so is the genome itself. A gene consists of e...
Difference Between Modem and Router
Your modem is a box that connects your home network to the wider Internet. A router is a box that lets all of your wired and wireless devices use that...
Difference Between SDLC and Waterfall Model
What is the difference between SDLC and waterfall model?What is difference between waterfall model and V model?Which SDLC model is better waterfall or...