What is the difference between Primary key and
unique index?
Answer Posted / guest1
Using the Primary Key you can establish referential
integrity. Unix index will be created upon the Primary Key
column, and the data will be seperately placed in the Index
space. If you have not created Unix Index, while accessing
the table it leads to SQLCODE = -540
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Following a db2 update statement, what is the quickest way to compute the total number of updated rows?
What is the physical storage length of the data types: date, time, timestamp in the db2 database?
How can you validate Sql errors during cursor operation in db2 pgms and where do you code?
How can deadlocks be resolved?
What is cloudant database?
What is difference between alias and synonym in db2?
What are types of indexes?
What is a db2 table?
What is the difference between "db2ilist" and "db2 get instance" commands in DB2 Database Server?
What is with ur in db2?
What is reorg and runstats 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.
Are view updateable?
How to create db2 table in mainframe?
What is db2 plan table?