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 |
What is the difference between plan and package in db2?
When Can you be sure that a query will return only one row?
What is DCLGEN ?
What is copy pending and check pending in db2?
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..
cursor with hold explain ?
What is a NULL value? What are the pros and cons of using NULLS?
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?
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.
what is copy pending and check pending ?
in column y record abc.v abc.s xyz.j abc.h i wan only abc columns how to retrieve thi records
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).