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 a plan and how do you refer the plan in the program?

2 Answers   Xansa,


When do you specify the isolation level? How?

1 Answers  


Mention and explain the contention situations caused by locks?

1 Answers  


How would the varchar column remarks defined?

0 Answers  


What are the advantages of using a PACKAGE?

2 Answers  


how can you access index

4 Answers   IBM, Tech Mahindra,


Why select is not preferred in embedded sql programs?

0 Answers  


What are some characteristics of columns that benefit from indexes?

1 Answers  


How to find primary key of a table in db2?

0 Answers  


Hi , I am posting some interview ques . what is the use of cursors ? what is the diff between select and cursor ? bith are used for data retrival .. rite?

2 Answers   Deloitte,


insert into tablename a column1, column2 select column1, column2 from tablename b i am getting abend -104..can any one help?

3 Answers   Syntel,


What is ALTER ?

3 Answers  


Categories