What is a NULL value? What are the pros and cons of using
NULLS?
Answer Posted / s
NULL Value indicates the absence of a value. DB2 treats
NULL as an actual value and is not equal to blank, zero or
empty string.
The default value of a CHAR data type is blanks, VARCHAR is
empty string and INT,SMALLINT,FLOAT etc is 0.
NULL is not equal to any of the above.
NULLs does not satify any condition in the SQL except when
IS NULL predicate is used. Null can be used at times when
you cannot specify a value for a column, eg middle names,
not everyone has middle names.
Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
How to rename a table in DB2 ?
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 is db2 and what is the use of db2 optimizer?
Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....
My sql statement select avg(salary) from emp yields inaccurate results. Why?
What is dbrm? What it contains? When it will be created?
What is dbrm? When it will be created?
What does a deadlock mean in DB2?
What does db2 plan contain?
Give the name of some fields form sqlca.
What is the meaning concurrency in the db2 database?
What are types of indexes?
Are views updateable?
What is host variable in db2 cobol?
How do I add a column to a table in db2?