The GET_IDCARD_AGE function validates an ID card number and returns the current age of the cardholder.
Syntax
get_idcard_age(<idcardno>)
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| idcardno | Yes | STRING | A 15-digit or 18-digit ID card number. The function validates the number by checking the province code and the last digit. Returns null if validation fails. |
Return value
Returns a BIGINT value. Returns null if the input is null.
References
-
To extend functionality beyond built-in functions, use user-defined functions (UDFs).
该文章对您有帮助吗?