หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
✅ Azure Stream Analytics ✅ Fabric Eventstream
Evaluates the arguments in order and returns the value of the first expression that initially does not evaluate to NULL.
Syntax
COALESCE ( expression1, expression2, [ ,…n ] )
Arguments
expression
An expression of any type.
Return Types
The type of the first non-null expression.
Examples
SELECT COALESCE(a, b) AS result FROM input
| Expression | Result |
|---|---|
| COALESCE(0, ‘a’) | 0 |
| COALESCE(NULL, ‘a’) | ‘a’ |
| COALESCE(NULL, NULL) | null |
| COALESCE(NULL, NULL, 2, NULL) | 2 |