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
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 |
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 |
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 we keep the DCLGEN structure for a table in a copybook and include it in the COBOL program using the COPY statement, will there be any impact during compilation or at any stage of program execution?
What is collection in db2 bind?
What is a root page?
How we create a tables in db2,what is the process/syntax to create a table with example plz?
What is the format (internal layout) of ?TIMESTAMP??
I have some 3 particular fields ..i want to know which all tables have those 3 fields. Is there any way to identify.. can we know by quering system tables..
What is the role of schema in the db2 database?
Suppose the outcome of executing a query results in a row having null. Based on the answer how you use it? Its declaration and inclusion?
Where can you declare a cursor in a cobol-db2 program?
I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?
What's the difference between DB2 active log and archive log? Thanks a lot...
What language is db2 written in?