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
Answer Posted / 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 |
Post New Answer View All Answers
What is role in db2?
What is database alias db2?
Which command is used to remove all rows from a table?
How to find the number of rows in a db2 table?
SET is the ANSI standard for variable assignment, SELECT is not. SET can only assign one variable at a time, SELECT can make multiple assignments at once. If assigning from a query, SET can only assign a scalar value. If the query returns multiple values/rows then SET will raise an error. SELECT will assign one of the values to the variable and hide the fact that multiple values were returned (so you'd likely never know why something was going wrong elsewhere - have fun troubleshooting that one) When assigning from a query if there is no value returned then SET will assign NULL, where SELECT will not make the assignment at all (so the variable will not be changed from it's previous value) As far as speed differences - there are no direct differences between SET and SELECT. However SELECT's ability to make multiple assignments in one shot does give it a slight speed advantage over SET.
What happens in bind step in a db2 program?
How can you quickly find out the # of rows updated after an update statement?
What are catalog tables in db2?
I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.
before altering a table is it necessary to lock ? if lock what is it ? how to do ? ifi want to lock a table what is that command ?
What is package in cobol db2?
How to view db2 table structure?
Are views updateable?
What is scrollable cursor in db2?
Why cursor is used in db2?