If there is no row in Emp table with Ename as Raghava and
you run the below queries in SPUFI.

1.select Ename from EMP wher Ename = 'raghava'
2.Select count(*) from EMP where Ename = 'raghava'

What is SQLCODE shown up in SPUFI

Answers were Sorted based on User's Feedback



If there is no row in Emp table with Ename as Raghava and you run the below queries in SPUFI. 1..

Answer / guest

For 1st query the sql code will +100
for second query the count is zero and sql code is 0

Is This Answer Correct ?    30 Yes 3 No

If there is no row in Emp table with Ename as Raghava and you run the below queries in SPUFI. 1..

Answer / krishna

2)when using count(*) it give always sql code 0 only
1)depending upone the rows if rows are their give 0
if not give 100

Is This Answer Correct ?    9 Yes 0 No

If there is no row in Emp table with Ename as Raghava and you run the below queries in SPUFI. 1..

Answer / raghavan.jcs

In both case, It will show SQLCODE +100.
As No row found condition is satisfied here

Is This Answer Correct ?    10 Yes 12 No

If there is no row in Emp table with Ename as Raghava and you run the below queries in SPUFI. 1..

Answer / ekalavya

In Both the cases it's ZERO.

Is This Answer Correct ?    1 Yes 15 No

Post New Answer

More DB2 Interview Questions

What is the difference between plan and package in db2?

0 Answers  


When Can you be sure that a query will return only one row?

4 Answers   IBM,


What is DCLGEN ?

2 Answers  


What is copy pending and check pending in db2?

0 Answers  


Could you please let me no the query for below I have table name xyx under this there is column name called employee name which starts from 100th column ends 120th column,now i want to replace only column from 101 to 104 which contains ABCS to replace with PQRS for all records which comes beetween 101 to 104 ..how to write query for this..

1 Answers   HSBC,






cursor with hold explain ?

1 Answers   Verizon,


What is a NULL value? What are the pros and cons of using NULLS?

2 Answers  


If a table has a column "dept" (declared to have nulls) and there are 10 rows in the table of which 3 have a null value in the dept column, what will select count(*) and select count(distinct dept) return?

6 Answers  


in the CURSOR declare statement, if i am using an where clause and trying to compare the value with a host-varialble. EXEC SQL DECLARE C1 CURSOR FOR SELECT DEPTNO, DEPTNAME, MGRNO FROM DEPARTMENT WHERE ADMRDEPT = :ADM-DEPT Where would i need to provide value to this host-variable in the where clause. how could i pass value to this host-variable to check it.

2 Answers   iGate,


what is copy pending and check pending ?

1 Answers   Xansa,


in column y record abc.v abc.s xyz.j abc.h i wan only abc columns how to retrieve thi records

2 Answers   IBM,


1) I have 3 programs : PGMA, PGMB, PGMC. PGMA calls PGMB and PGMB calls PGMC. I have to do inserts, updates in all the 3 pgms. 2) Say PGMC has done its work successfully and returned to PGMB 3) PGMB had an SQL error while doing some update 4) PGMA has already done some updates before calling PGMB all are running under the same CICS region. What will happen if I issue SYNCPOINT ROLLBACK in PGMB when it abends ? Does all the changes in PGMA,B,C rollback ? (because all the pgms belong to same task).

1 Answers  


Categories