A simple understanding of the coalesce function in Oracle 2008-01-1814: 23: 48 classification of individuals: Oracle Database Technology-SQL view (288) Comments (0) score (00) during the test today, I found an SQL: deletefromTS_LOCKSwhereCOALESCE (FLPLNCMPNTID, 0): 1 andCOALESCE (FLPLN
A simple understanding of the coalesce function in Oracle/14:23:48/personal classification: Oracle Database Technology-SQL view (288)/comments (0)/scores (0/0) today during the test, an SQL statement is found: delete from TS_LOCKS where COALESCE (FLPLNCMPNTID, 0) =: 1 and COALESCE (FLPLN
A simple understanding of coalesce functions in Oracle
/14:23:48/person type: Oracle Database Technology-SQL
View (288)/comment (0)/score (0/0)
We are doing this todayTestWhen I foundSQL:
Delete from TS_LOCKS whereCOALESCE(FLPLNCMPNTID, 0) =: 1 andCOALESCE(FLPLNCMPNTPARTID, 0) =: 2
The coalesce function is used, so what is the use of this function?
To explain:
COALESCE (a, B, c, d... z)
Returns the first non-null value in the parameter table (starting from left)
That is to say, if a is not null, a is returned. If a is null, B is judged, and so on.
A, B, c, d... z can be a field, or the return value of another function or the result value of an expression.