# Conditional functions

> IF, IFNULL and ISNULL. Match each branch’s type as well as the condition type.

---

LLMS index: [llms.txt](/llms.txt)

---

IF, IFNULL and ISNULL. Match each branch’s type as well as the condition type.

## if {#if}

| Signature | Purpose | Source definition |
|---|---|---|
| <a id="mysql-if-bigint-boolean-boolean-0cf2664d" href="#mysql-if-bigint-boolean-boolean-0cf2664d">`mysql.if(bigint, boolean, boolean) → boolean`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L571-L572) |
| <a id="mysql-if-bigint-character-varying-character-ce1e5d25" href="#mysql-if-bigint-character-varying-character-ce1e5d25">`mysql.if(bigint, character varying, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-bigint-character-varying-pg-catalog-text-ccf62f77" href="#mysql-if-bigint-character-varying-pg-catalog-text-ccf62f77">`mysql.if(bigint, character varying, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-bigint-character-character-varying-26641f33" href="#mysql-if-bigint-character-character-varying-26641f33">`mysql.if(bigint, character, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-bigint-character-pg-catalog-text-42d628f8" href="#mysql-if-bigint-character-pg-catalog-text-42d628f8">`mysql.if(bigint, character, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-bigint-pg-catalog-text-character-varying-5a466c3a" href="#mysql-if-bigint-pg-catalog-text-character-varying-5a466c3a">`mysql.if(bigint, text, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-bigint-pg-catalog-text-character-141c5ea7" href="#mysql-if-bigint-pg-catalog-text-character-141c5ea7">`mysql.if(bigint, text, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-boolean-boolean-boolean-aec30dc5" href="#mysql-if-boolean-boolean-boolean-aec30dc5">`mysql.if(boolean, boolean, boolean) → boolean`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L571-L572) |
| <a id="mysql-if-boolean-character-varying-character-afa6e1b6" href="#mysql-if-boolean-character-varying-character-afa6e1b6">`mysql.if(boolean, character varying, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-boolean-character-varying-pg-catalog-text-7602e6de" href="#mysql-if-boolean-character-varying-pg-catalog-text-7602e6de">`mysql.if(boolean, character varying, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-boolean-character-character-varying-e4ca869e" href="#mysql-if-boolean-character-character-varying-e4ca869e">`mysql.if(boolean, character, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-boolean-character-pg-catalog-text-6a89f292" href="#mysql-if-boolean-character-pg-catalog-text-6a89f292">`mysql.if(boolean, character, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-boolean-pg-catalog-text-character-varying-2e60eb2b" href="#mysql-if-boolean-pg-catalog-text-character-varying-2e60eb2b">`mysql.if(boolean, text, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-boolean-pg-catalog-text-character-5ce4773d" href="#mysql-if-boolean-pg-catalog-text-character-5ce4773d">`mysql.if(boolean, text, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-bigint-bigint-bigint-c573f6db" href="#mysql-if-bigint-bigint-bigint-c573f6db">`mysql.if(condition bigint, value2 bigint, value3 bigint) → bigint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L776-L788) |
| <a id="mysql-if-bigint-character-varying-character-varying-7b9ba07a" href="#mysql-if-bigint-character-varying-character-varying-7b9ba07a">`mysql.if(condition bigint, value2 character varying, value3 character varying) → character varying`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L874-L886) |
| <a id="mysql-if-bigint-character-character-b6133b71" href="#mysql-if-bigint-character-character-b6133b71">`mysql.if(condition bigint, value2 character, value3 character) → character`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L860-L872) |
| <a id="mysql-if-bigint-pg-catalog-date-pg-catalog-date-617cbb35" href="#mysql-if-bigint-pg-catalog-date-pg-catalog-date-617cbb35">`mysql.if(condition bigint, value2 date, value3 date) → date`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L902-L914) |
| <a id="mysql-if-bigint-double-precision-double-precision-eadc36dc" href="#mysql-if-bigint-double-precision-double-precision-eadc36dc">`mysql.if(condition bigint, value2 double precision, value3 double precision) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L804-L816) |
| <a id="mysql-if-bigint-integer-integer-ee73982d" href="#mysql-if-bigint-integer-integer-ee73982d">`mysql.if(condition bigint, value2 integer, value3 integer) → integer`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L762-L774) |
| <a id="mysql-if-bigint-mysql-real-mysql-real-ef309e95" href="#mysql-if-bigint-mysql-real-mysql-real-ef309e95">`mysql.if(condition bigint, value2 mysql."real", value3 mysql."real") → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L846-L858) |
| <a id="mysql-if-bigint-mysql-smallint-mysql-smallint-41f7ab25" href="#mysql-if-bigint-mysql-smallint-mysql-smallint-41f7ab25">`mysql.if(condition bigint, value2 mysql."smallint", value3 mysql."smallint") → mysql."smallint"`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L734-L746) |
| <a id="mysql-if-bigint-mysql-datetime-mysql-datetime-3a64cd44" href="#mysql-if-bigint-mysql-datetime-mysql-datetime-3a64cd44">`mysql.if(condition bigint, value2 mysql.datetime, value3 mysql.datetime) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L930-L942) |
| <a id="mysql-if-bigint-mysql-double-mysql-double-5a784714" href="#mysql-if-bigint-mysql-double-mysql-double-5a784714">`mysql.if(condition bigint, value2 mysql.double, value3 mysql.double) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L832-L844) |
| <a id="mysql-if-bigint-mysql-mediumint-mysql-mediumint-eae4072b" href="#mysql-if-bigint-mysql-mediumint-mysql-mediumint-eae4072b">`mysql.if(condition bigint, value2 mysql.mediumint, value3 mysql.mediumint) → mysql.mediumint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L748-L760) |
| <a id="mysql-if-bigint-mysql-tinyint-mysql-tinyint-7b15a080" href="#mysql-if-bigint-mysql-tinyint-mysql-tinyint-7b15a080">`mysql.if(condition bigint, value2 mysql.tinyint, value3 mysql.tinyint) → mysql.tinyint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L720-L732) |
| <a id="mysql-if-bigint-numeric-numeric-45f415eb" href="#mysql-if-bigint-numeric-numeric-45f415eb">`mysql.if(condition bigint, value2 numeric, value3 numeric) → numeric`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L818-L830) |
| <a id="mysql-if-bigint-real-real-3530e132" href="#mysql-if-bigint-real-real-3530e132">`mysql.if(condition bigint, value2 real, value3 real) → real`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L790-L802) |
| <a id="mysql-if-bigint-pg-catalog-text-pg-catalog-text-ae3141b0" href="#mysql-if-bigint-pg-catalog-text-pg-catalog-text-ae3141b0">`mysql.if(condition bigint, value2 text, value3 text) → text`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L888-L900) |
| <a id="mysql-if-bigint-time-without-time-zone-time-without-time-zone-3d7b39d8" href="#mysql-if-bigint-time-without-time-zone-time-without-time-zone-3d7b39d8">`mysql.if(condition bigint, value2 time without time zone, value3 time without time zone) → time without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L916-L928) |
| <a id="mysql-if-bigint-timestamp-without-time-zone-timestamp-without-time-zone-29a99f21" href="#mysql-if-bigint-timestamp-without-time-zone-timestamp-without-time-zone-29a99f21">`mysql.if(condition bigint, value2 timestamp without time zone, value3 timestamp without time zone) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L944-L956) |
| <a id="mysql-if-boolean-bigint-bigint-927f2e40" href="#mysql-if-boolean-bigint-bigint-927f2e40">`mysql.if(condition boolean, value2 bigint, value3 bigint) → bigint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1014-L1026) |
| <a id="mysql-if-boolean-character-varying-character-varying-b0cf9825" href="#mysql-if-boolean-character-varying-character-varying-b0cf9825">`mysql.if(condition boolean, value2 character varying, value3 character varying) → character varying`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1112-L1124) |
| <a id="mysql-if-boolean-character-character-074f4fd4" href="#mysql-if-boolean-character-character-074f4fd4">`mysql.if(condition boolean, value2 character, value3 character) → character`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1098-L1110) |
| <a id="mysql-if-boolean-pg-catalog-date-pg-catalog-date-c0f9a7b9" href="#mysql-if-boolean-pg-catalog-date-pg-catalog-date-c0f9a7b9">`mysql.if(condition boolean, value2 date, value3 date) → date`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1140-L1152) |
| <a id="mysql-if-boolean-double-precision-double-precision-378fdb53" href="#mysql-if-boolean-double-precision-double-precision-378fdb53">`mysql.if(condition boolean, value2 double precision, value3 double precision) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1042-L1054) |
| <a id="mysql-if-boolean-integer-integer-3ab72a45" href="#mysql-if-boolean-integer-integer-3ab72a45">`mysql.if(condition boolean, value2 integer, value3 integer) → integer`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1000-L1012) |
| <a id="mysql-if-boolean-mysql-real-mysql-real-ec291dd3" href="#mysql-if-boolean-mysql-real-mysql-real-ec291dd3">`mysql.if(condition boolean, value2 mysql."real", value3 mysql."real") → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1084-L1096) |
| <a id="mysql-if-boolean-mysql-smallint-mysql-smallint-7f2b6eaf" href="#mysql-if-boolean-mysql-smallint-mysql-smallint-7f2b6eaf">`mysql.if(condition boolean, value2 mysql."smallint", value3 mysql."smallint") → mysql."smallint"`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L972-L984) |
| <a id="mysql-if-boolean-mysql-datetime-mysql-datetime-71b86c7c" href="#mysql-if-boolean-mysql-datetime-mysql-datetime-71b86c7c">`mysql.if(condition boolean, value2 mysql.datetime, value3 mysql.datetime) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1168-L1180) |
| <a id="mysql-if-boolean-mysql-double-mysql-double-f82b9cb3" href="#mysql-if-boolean-mysql-double-mysql-double-f82b9cb3">`mysql.if(condition boolean, value2 mysql.double, value3 mysql.double) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1070-L1082) |
| <a id="mysql-if-boolean-mysql-mediumint-mysql-mediumint-2d9aa78e" href="#mysql-if-boolean-mysql-mediumint-mysql-mediumint-2d9aa78e">`mysql.if(condition boolean, value2 mysql.mediumint, value3 mysql.mediumint) → mysql.mediumint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L986-L998) |
| <a id="mysql-if-boolean-mysql-tinyint-mysql-tinyint-9df9ee69" href="#mysql-if-boolean-mysql-tinyint-mysql-tinyint-9df9ee69">`mysql.if(condition boolean, value2 mysql.tinyint, value3 mysql.tinyint) → mysql.tinyint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L958-L970) |
| <a id="mysql-if-boolean-numeric-numeric-172641cb" href="#mysql-if-boolean-numeric-numeric-172641cb">`mysql.if(condition boolean, value2 numeric, value3 numeric) → numeric`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1056-L1068) |
| <a id="mysql-if-boolean-real-real-d3d2a093" href="#mysql-if-boolean-real-real-d3d2a093">`mysql.if(condition boolean, value2 real, value3 real) → real`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1028-L1040) |
| <a id="mysql-if-boolean-pg-catalog-text-pg-catalog-text-0bb3aff6" href="#mysql-if-boolean-pg-catalog-text-pg-catalog-text-0bb3aff6">`mysql.if(condition boolean, value2 text, value3 text) → text`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1126-L1138) |
| <a id="mysql-if-boolean-time-without-time-zone-time-without-time-zone-5f49401c" href="#mysql-if-boolean-time-without-time-zone-time-without-time-zone-5f49401c">`mysql.if(condition boolean, value2 time without time zone, value3 time without time zone) → time without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1154-L1166) |
| <a id="mysql-if-boolean-timestamp-without-time-zone-timestamp-without-time-zone-f510600c" href="#mysql-if-boolean-timestamp-without-time-zone-timestamp-without-time-zone-f510600c">`mysql.if(condition boolean, value2 timestamp without time zone, value3 timestamp without time zone) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1182-L1194) |
| <a id="mysql-if-pg-catalog-date-bigint-bigint-1797dbcc" href="#mysql-if-pg-catalog-date-bigint-bigint-1797dbcc">`mysql.if(condition date, value2 bigint, value3 bigint) → bigint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2556-L2571) |
| <a id="mysql-if-pg-catalog-date-character-varying-character-varying-42ded33a" href="#mysql-if-pg-catalog-date-character-varying-character-varying-42ded33a">`mysql.if(condition date, value2 character varying, value3 character varying) → character varying`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2675-L2690) |
| <a id="mysql-if-pg-catalog-date-character-character-c239ddf0" href="#mysql-if-pg-catalog-date-character-character-c239ddf0">`mysql.if(condition date, value2 character, value3 character) → character`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2658-L2673) |
| <a id="mysql-if-pg-catalog-date-pg-catalog-date-pg-catalog-date-3a04c2a6" href="#mysql-if-pg-catalog-date-pg-catalog-date-pg-catalog-date-3a04c2a6">`mysql.if(condition date, value2 date, value3 date) → date`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2709-L2724) |
| <a id="mysql-if-pg-catalog-date-double-precision-double-precision-489c574e" href="#mysql-if-pg-catalog-date-double-precision-double-precision-489c574e">`mysql.if(condition date, value2 double precision, value3 double precision) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2590-L2605) |
| <a id="mysql-if-pg-catalog-date-integer-integer-f8965e57" href="#mysql-if-pg-catalog-date-integer-integer-f8965e57">`mysql.if(condition date, value2 integer, value3 integer) → integer`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2539-L2554) |
| <a id="mysql-if-pg-catalog-date-mysql-real-mysql-real-70f8d56c" href="#mysql-if-pg-catalog-date-mysql-real-mysql-real-70f8d56c">`mysql.if(condition date, value2 mysql."real", value3 mysql."real") → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2641-L2656) |
| <a id="mysql-if-pg-catalog-date-mysql-smallint-mysql-smallint-65125b3f" href="#mysql-if-pg-catalog-date-mysql-smallint-mysql-smallint-65125b3f">`mysql.if(condition date, value2 mysql."smallint", value3 mysql."smallint") → mysql."smallint"`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2505-L2520) |
| <a id="mysql-if-pg-catalog-date-mysql-datetime-mysql-datetime-35111457" href="#mysql-if-pg-catalog-date-mysql-datetime-mysql-datetime-35111457">`mysql.if(condition date, value2 mysql.datetime, value3 mysql.datetime) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2743-L2758) |
| <a id="mysql-if-pg-catalog-date-mysql-double-mysql-double-aa22a704" href="#mysql-if-pg-catalog-date-mysql-double-mysql-double-aa22a704">`mysql.if(condition date, value2 mysql.double, value3 mysql.double) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2624-L2639) |
| <a id="mysql-if-pg-catalog-date-mysql-mediumint-mysql-mediumint-372b1354" href="#mysql-if-pg-catalog-date-mysql-mediumint-mysql-mediumint-372b1354">`mysql.if(condition date, value2 mysql.mediumint, value3 mysql.mediumint) → mysql.mediumint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2522-L2537) |
| <a id="mysql-if-pg-catalog-date-mysql-tinyint-mysql-tinyint-5eba56a4" href="#mysql-if-pg-catalog-date-mysql-tinyint-mysql-tinyint-5eba56a4">`mysql.if(condition date, value2 mysql.tinyint, value3 mysql.tinyint) → mysql.tinyint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2488-L2503) |
| <a id="mysql-if-pg-catalog-date-numeric-numeric-1b096ce7" href="#mysql-if-pg-catalog-date-numeric-numeric-1b096ce7">`mysql.if(condition date, value2 numeric, value3 numeric) → numeric`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2607-L2622) |
| <a id="mysql-if-pg-catalog-date-real-real-f1f0b3c6" href="#mysql-if-pg-catalog-date-real-real-f1f0b3c6">`mysql.if(condition date, value2 real, value3 real) → real`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2573-L2588) |
| <a id="mysql-if-pg-catalog-date-pg-catalog-text-pg-catalog-text-295252bb" href="#mysql-if-pg-catalog-date-pg-catalog-text-pg-catalog-text-295252bb">`mysql.if(condition date, value2 text, value3 text) → text`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2692-L2707) |
| <a id="mysql-if-pg-catalog-date-time-without-time-zone-time-without-time-zone-cb1d1e00" href="#mysql-if-pg-catalog-date-time-without-time-zone-time-without-time-zone-cb1d1e00">`mysql.if(condition date, value2 time without time zone, value3 time without time zone) → time without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2726-L2741) |
| <a id="mysql-if-pg-catalog-date-timestamp-without-time-zone-timestamp-without-time-zone-8983e98a" href="#mysql-if-pg-catalog-date-timestamp-without-time-zone-timestamp-without-time-zone-8983e98a">`mysql.if(condition date, value2 timestamp without time zone, value3 timestamp without time zone) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2760-L2775) |
| <a id="mysql-if-double-precision-bigint-bigint-465ed97f" href="#mysql-if-double-precision-bigint-bigint-465ed97f">`mysql.if(condition double precision, value2 bigint, value3 bigint) → bigint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1252-L1264) |
| <a id="mysql-if-double-precision-character-varying-character-varying-bdce0f3a" href="#mysql-if-double-precision-character-varying-character-varying-bdce0f3a">`mysql.if(condition double precision, value2 character varying, value3 character varying) → character varying`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1350-L1362) |
| <a id="mysql-if-double-precision-character-character-8153a588" href="#mysql-if-double-precision-character-character-8153a588">`mysql.if(condition double precision, value2 character, value3 character) → character`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1336-L1348) |
| <a id="mysql-if-double-precision-pg-catalog-date-pg-catalog-date-d69f1913" href="#mysql-if-double-precision-pg-catalog-date-pg-catalog-date-d69f1913">`mysql.if(condition double precision, value2 date, value3 date) → date`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1378-L1390) |
| <a id="mysql-if-double-precision-double-precision-double-precision-d254a6f5" href="#mysql-if-double-precision-double-precision-double-precision-d254a6f5">`mysql.if(condition double precision, value2 double precision, value3 double precision) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1280-L1292) |
| <a id="mysql-if-double-precision-integer-integer-1102d85d" href="#mysql-if-double-precision-integer-integer-1102d85d">`mysql.if(condition double precision, value2 integer, value3 integer) → integer`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1238-L1250) |
| <a id="mysql-if-double-precision-mysql-real-mysql-real-a283986d" href="#mysql-if-double-precision-mysql-real-mysql-real-a283986d">`mysql.if(condition double precision, value2 mysql."real", value3 mysql."real") → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1322-L1334) |
| <a id="mysql-if-double-precision-mysql-smallint-mysql-smallint-fffec6e3" href="#mysql-if-double-precision-mysql-smallint-mysql-smallint-fffec6e3">`mysql.if(condition double precision, value2 mysql."smallint", value3 mysql."smallint") → mysql."smallint"`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1210-L1222) |
| <a id="mysql-if-double-precision-mysql-datetime-mysql-datetime-4094fb60" href="#mysql-if-double-precision-mysql-datetime-mysql-datetime-4094fb60">`mysql.if(condition double precision, value2 mysql.datetime, value3 mysql.datetime) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1406-L1418) |
| <a id="mysql-if-double-precision-mysql-double-mysql-double-c54995b7" href="#mysql-if-double-precision-mysql-double-mysql-double-c54995b7">`mysql.if(condition double precision, value2 mysql.double, value3 mysql.double) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1308-L1320) |
| <a id="mysql-if-double-precision-mysql-mediumint-mysql-mediumint-e131c64c" href="#mysql-if-double-precision-mysql-mediumint-mysql-mediumint-e131c64c">`mysql.if(condition double precision, value2 mysql.mediumint, value3 mysql.mediumint) → mysql.mediumint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1224-L1236) |
| <a id="mysql-if-double-precision-mysql-tinyint-mysql-tinyint-7c5ea31c" href="#mysql-if-double-precision-mysql-tinyint-mysql-tinyint-7c5ea31c">`mysql.if(condition double precision, value2 mysql.tinyint, value3 mysql.tinyint) → mysql.tinyint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1196-L1208) |
| <a id="mysql-if-double-precision-numeric-numeric-b9fd0e99" href="#mysql-if-double-precision-numeric-numeric-b9fd0e99">`mysql.if(condition double precision, value2 numeric, value3 numeric) → numeric`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1294-L1306) |
| <a id="mysql-if-double-precision-real-real-0a86da84" href="#mysql-if-double-precision-real-real-0a86da84">`mysql.if(condition double precision, value2 real, value3 real) → real`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1266-L1278) |
| <a id="mysql-if-double-precision-pg-catalog-text-pg-catalog-text-7869a764" href="#mysql-if-double-precision-pg-catalog-text-pg-catalog-text-7869a764">`mysql.if(condition double precision, value2 text, value3 text) → text`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1364-L1376) |
| <a id="mysql-if-double-precision-time-without-time-zone-time-without-time-zone-1773e153" href="#mysql-if-double-precision-time-without-time-zone-time-without-time-zone-1773e153">`mysql.if(condition double precision, value2 time without time zone, value3 time without time zone) → time without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1392-L1404) |
| <a id="mysql-if-double-precision-timestamp-without-time-zone-timestamp-without-time-zone-8be2ef09" href="#mysql-if-double-precision-timestamp-without-time-zone-timestamp-without-time-zone-8be2ef09">`mysql.if(condition double precision, value2 timestamp without time zone, value3 timestamp without time zone) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1420-L1432) |
| <a id="mysql-if-integer-bigint-bigint-2cb96d35" href="#mysql-if-integer-bigint-bigint-2cb96d35">`mysql.if(condition integer, value2 bigint, value3 bigint) → bigint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L538-L550) |
| <a id="mysql-if-integer-character-varying-character-varying-a742de0e" href="#mysql-if-integer-character-varying-character-varying-a742de0e">`mysql.if(condition integer, value2 character varying, value3 character varying) → character varying`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L636-L648) |
| <a id="mysql-if-integer-character-character-de857395" href="#mysql-if-integer-character-character-de857395">`mysql.if(condition integer, value2 character, value3 character) → character`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L622-L634) |
| <a id="mysql-if-integer-pg-catalog-date-pg-catalog-date-cc4e0b3c" href="#mysql-if-integer-pg-catalog-date-pg-catalog-date-cc4e0b3c">`mysql.if(condition integer, value2 date, value3 date) → date`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L664-L676) |
| <a id="mysql-if-integer-double-precision-double-precision-5a970071" href="#mysql-if-integer-double-precision-double-precision-5a970071">`mysql.if(condition integer, value2 double precision, value3 double precision) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L566-L578) |
| <a id="mysql-if-integer-integer-integer-e6785d28" href="#mysql-if-integer-integer-integer-e6785d28">`mysql.if(condition integer, value2 integer, value3 integer) → integer`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L524-L536) |
| <a id="mysql-if-integer-mysql-real-mysql-real-a2478941" href="#mysql-if-integer-mysql-real-mysql-real-a2478941">`mysql.if(condition integer, value2 mysql."real", value3 mysql."real") → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L608-L620) |
| <a id="mysql-if-integer-mysql-smallint-mysql-smallint-5182805d" href="#mysql-if-integer-mysql-smallint-mysql-smallint-5182805d">`mysql.if(condition integer, value2 mysql."smallint", value3 mysql."smallint") → mysql."smallint"`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L496-L508) |
| <a id="mysql-if-integer-mysql-datetime-mysql-datetime-d6a402ac" href="#mysql-if-integer-mysql-datetime-mysql-datetime-d6a402ac">`mysql.if(condition integer, value2 mysql.datetime, value3 mysql.datetime) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L692-L704) |
| <a id="mysql-if-integer-mysql-double-mysql-double-d613e9a5" href="#mysql-if-integer-mysql-double-mysql-double-d613e9a5">`mysql.if(condition integer, value2 mysql.double, value3 mysql.double) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L594-L606) |
| <a id="mysql-if-integer-mysql-mediumint-mysql-mediumint-cdb14298" href="#mysql-if-integer-mysql-mediumint-mysql-mediumint-cdb14298">`mysql.if(condition integer, value2 mysql.mediumint, value3 mysql.mediumint) → mysql.mediumint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L510-L522) |
| <a id="mysql-if-integer-mysql-tinyint-mysql-tinyint-1d2b44eb" href="#mysql-if-integer-mysql-tinyint-mysql-tinyint-1d2b44eb">`mysql.if(condition integer, value2 mysql.tinyint, value3 mysql.tinyint) → mysql.tinyint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L482-L494) |
| <a id="mysql-if-integer-numeric-numeric-f4259cd1" href="#mysql-if-integer-numeric-numeric-f4259cd1">`mysql.if(condition integer, value2 numeric, value3 numeric) → numeric`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L580-L592) |
| <a id="mysql-if-integer-real-real-13f63de6" href="#mysql-if-integer-real-real-13f63de6">`mysql.if(condition integer, value2 real, value3 real) → real`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L552-L564) |
| <a id="mysql-if-integer-pg-catalog-text-pg-catalog-text-1d00a204" href="#mysql-if-integer-pg-catalog-text-pg-catalog-text-1d00a204">`mysql.if(condition integer, value2 text, value3 text) → text`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L650-L662) |
| <a id="mysql-if-integer-time-without-time-zone-time-without-time-zone-e0bd6a89" href="#mysql-if-integer-time-without-time-zone-time-without-time-zone-e0bd6a89">`mysql.if(condition integer, value2 time without time zone, value3 time without time zone) → time without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L678-L690) |
| <a id="mysql-if-integer-timestamp-without-time-zone-timestamp-without-time-zone-82784d7f" href="#mysql-if-integer-timestamp-without-time-zone-timestamp-without-time-zone-82784d7f">`mysql.if(condition integer, value2 timestamp without time zone, value3 timestamp without time zone) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L706-L718) |
| <a id="mysql-if-mysql-smallint-bigint-bigint-5c552c9a" href="#mysql-if-mysql-smallint-bigint-bigint-5c552c9a">`mysql.if(condition mysql."smallint", value2 bigint, value3 bigint) → bigint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L300-L312) |
| <a id="mysql-if-mysql-smallint-character-varying-character-varying-7b8fb6c6" href="#mysql-if-mysql-smallint-character-varying-character-varying-7b8fb6c6">`mysql.if(condition mysql."smallint", value2 character varying, value3 character varying) → character varying`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L398-L410) |
| <a id="mysql-if-mysql-smallint-character-character-570d1825" href="#mysql-if-mysql-smallint-character-character-570d1825">`mysql.if(condition mysql."smallint", value2 character, value3 character) → character`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L384-L396) |
| <a id="mysql-if-mysql-smallint-pg-catalog-date-pg-catalog-date-3608f792" href="#mysql-if-mysql-smallint-pg-catalog-date-pg-catalog-date-3608f792">`mysql.if(condition mysql."smallint", value2 date, value3 date) → date`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L426-L438) |
| <a id="mysql-if-mysql-smallint-double-precision-double-precision-f52297d3" href="#mysql-if-mysql-smallint-double-precision-double-precision-f52297d3">`mysql.if(condition mysql."smallint", value2 double precision, value3 double precision) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L328-L340) |
| <a id="mysql-if-mysql-smallint-integer-integer-a88ed315" href="#mysql-if-mysql-smallint-integer-integer-a88ed315">`mysql.if(condition mysql."smallint", value2 integer, value3 integer) → integer`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L286-L298) |
| <a id="mysql-if-mysql-smallint-mysql-real-mysql-real-5a5280ff" href="#mysql-if-mysql-smallint-mysql-real-mysql-real-5a5280ff">`mysql.if(condition mysql."smallint", value2 mysql."real", value3 mysql."real") → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L370-L382) |
| <a id="mysql-if-mysql-smallint-mysql-smallint-mysql-smallint-71795ee6" href="#mysql-if-mysql-smallint-mysql-smallint-mysql-smallint-71795ee6">`mysql.if(condition mysql."smallint", value2 mysql."smallint", value3 mysql."smallint") → mysql."smallint"`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L258-L270) |
| <a id="mysql-if-mysql-smallint-mysql-datetime-mysql-datetime-dbb6315d" href="#mysql-if-mysql-smallint-mysql-datetime-mysql-datetime-dbb6315d">`mysql.if(condition mysql."smallint", value2 mysql.datetime, value3 mysql.datetime) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L454-L466) |
| <a id="mysql-if-mysql-smallint-mysql-double-mysql-double-3ad056aa" href="#mysql-if-mysql-smallint-mysql-double-mysql-double-3ad056aa">`mysql.if(condition mysql."smallint", value2 mysql.double, value3 mysql.double) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L356-L368) |
| <a id="mysql-if-mysql-smallint-mysql-mediumint-mysql-mediumint-79563925" href="#mysql-if-mysql-smallint-mysql-mediumint-mysql-mediumint-79563925">`mysql.if(condition mysql."smallint", value2 mysql.mediumint, value3 mysql.mediumint) → mysql.mediumint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L272-L284) |
| <a id="mysql-if-mysql-smallint-mysql-tinyint-mysql-tinyint-bdac5aaa" href="#mysql-if-mysql-smallint-mysql-tinyint-mysql-tinyint-bdac5aaa">`mysql.if(condition mysql."smallint", value2 mysql.tinyint, value3 mysql.tinyint) → mysql.tinyint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L244-L256) |
| <a id="mysql-if-mysql-smallint-numeric-numeric-6758f98d" href="#mysql-if-mysql-smallint-numeric-numeric-6758f98d">`mysql.if(condition mysql."smallint", value2 numeric, value3 numeric) → numeric`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L342-L354) |
| <a id="mysql-if-mysql-smallint-real-real-a4cef1e5" href="#mysql-if-mysql-smallint-real-real-a4cef1e5">`mysql.if(condition mysql."smallint", value2 real, value3 real) → real`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L314-L326) |
| <a id="mysql-if-mysql-smallint-pg-catalog-text-pg-catalog-text-6f3c3496" href="#mysql-if-mysql-smallint-pg-catalog-text-pg-catalog-text-6f3c3496">`mysql.if(condition mysql."smallint", value2 text, value3 text) → text`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L412-L424) |
| <a id="mysql-if-mysql-smallint-time-without-time-zone-time-without-time-zone-2abaf246" href="#mysql-if-mysql-smallint-time-without-time-zone-time-without-time-zone-2abaf246">`mysql.if(condition mysql."smallint", value2 time without time zone, value3 time without time zone) → time without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L440-L452) |
| <a id="mysql-if-mysql-smallint-timestamp-without-time-zone-timestamp-without-time-zone-14e5cf6b" href="#mysql-if-mysql-smallint-timestamp-without-time-zone-timestamp-without-time-zone-14e5cf6b">`mysql.if(condition mysql."smallint", value2 timestamp without time zone, value3 timestamp without time zone) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L468-L480) |
| <a id="mysql-if-mysql-double-bigint-bigint-e7ecf1a2" href="#mysql-if-mysql-double-bigint-bigint-e7ecf1a2">`mysql.if(condition mysql.double, value2 bigint, value3 bigint) → bigint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1490-L1502) |
| <a id="mysql-if-mysql-double-character-varying-character-varying-8f2358a3" href="#mysql-if-mysql-double-character-varying-character-varying-8f2358a3">`mysql.if(condition mysql.double, value2 character varying, value3 character varying) → character varying`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1588-L1600) |
| <a id="mysql-if-mysql-double-character-character-6cb00810" href="#mysql-if-mysql-double-character-character-6cb00810">`mysql.if(condition mysql.double, value2 character, value3 character) → character`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1574-L1586) |
| <a id="mysql-if-mysql-double-pg-catalog-date-pg-catalog-date-4208396f" href="#mysql-if-mysql-double-pg-catalog-date-pg-catalog-date-4208396f">`mysql.if(condition mysql.double, value2 date, value3 date) → date`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1616-L1628) |
| <a id="mysql-if-mysql-double-double-precision-double-precision-3aa0f6af" href="#mysql-if-mysql-double-double-precision-double-precision-3aa0f6af">`mysql.if(condition mysql.double, value2 double precision, value3 double precision) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1518-L1530) |
| <a id="mysql-if-mysql-double-integer-integer-eb1fa321" href="#mysql-if-mysql-double-integer-integer-eb1fa321">`mysql.if(condition mysql.double, value2 integer, value3 integer) → integer`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1476-L1488) |
| <a id="mysql-if-mysql-double-mysql-real-mysql-real-288a8253" href="#mysql-if-mysql-double-mysql-real-mysql-real-288a8253">`mysql.if(condition mysql.double, value2 mysql."real", value3 mysql."real") → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1560-L1572) |
| <a id="mysql-if-mysql-double-mysql-smallint-mysql-smallint-71fd88e9" href="#mysql-if-mysql-double-mysql-smallint-mysql-smallint-71fd88e9">`mysql.if(condition mysql.double, value2 mysql."smallint", value3 mysql."smallint") → mysql."smallint"`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1448-L1460) |
| <a id="mysql-if-mysql-double-mysql-datetime-mysql-datetime-8b4e8ea0" href="#mysql-if-mysql-double-mysql-datetime-mysql-datetime-8b4e8ea0">`mysql.if(condition mysql.double, value2 mysql.datetime, value3 mysql.datetime) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1644-L1656) |
| <a id="mysql-if-mysql-double-mysql-double-mysql-double-6bb26faf" href="#mysql-if-mysql-double-mysql-double-mysql-double-6bb26faf">`mysql.if(condition mysql.double, value2 mysql.double, value3 mysql.double) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1546-L1558) |
| <a id="mysql-if-mysql-double-mysql-mediumint-mysql-mediumint-9148fa4c" href="#mysql-if-mysql-double-mysql-mediumint-mysql-mediumint-9148fa4c">`mysql.if(condition mysql.double, value2 mysql.mediumint, value3 mysql.mediumint) → mysql.mediumint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1462-L1474) |
| <a id="mysql-if-mysql-double-mysql-tinyint-mysql-tinyint-7581ecfa" href="#mysql-if-mysql-double-mysql-tinyint-mysql-tinyint-7581ecfa">`mysql.if(condition mysql.double, value2 mysql.tinyint, value3 mysql.tinyint) → mysql.tinyint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1434-L1446) |
| <a id="mysql-if-mysql-double-numeric-numeric-50848848" href="#mysql-if-mysql-double-numeric-numeric-50848848">`mysql.if(condition mysql.double, value2 numeric, value3 numeric) → numeric`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1532-L1544) |
| <a id="mysql-if-mysql-double-real-real-cad8dff2" href="#mysql-if-mysql-double-real-real-cad8dff2">`mysql.if(condition mysql.double, value2 real, value3 real) → real`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1504-L1516) |
| <a id="mysql-if-mysql-double-pg-catalog-text-pg-catalog-text-4c7f5989" href="#mysql-if-mysql-double-pg-catalog-text-pg-catalog-text-4c7f5989">`mysql.if(condition mysql.double, value2 text, value3 text) → text`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1602-L1614) |
| <a id="mysql-if-mysql-double-time-without-time-zone-time-without-time-zone-dcab2ebd" href="#mysql-if-mysql-double-time-without-time-zone-time-without-time-zone-dcab2ebd">`mysql.if(condition mysql.double, value2 time without time zone, value3 time without time zone) → time without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1630-L1642) |
| <a id="mysql-if-mysql-double-timestamp-without-time-zone-timestamp-without-time-zone-f4476eae" href="#mysql-if-mysql-double-timestamp-without-time-zone-timestamp-without-time-zone-f4476eae">`mysql.if(condition mysql.double, value2 timestamp without time zone, value3 timestamp without time zone) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1658-L1670) |
| <a id="mysql-if-mysql-tinyint-bigint-bigint-21279c1a" href="#mysql-if-mysql-tinyint-bigint-bigint-21279c1a">`mysql.if(condition mysql.tinyint, value2 bigint, value3 bigint) → bigint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L62-L74) |
| <a id="mysql-if-mysql-tinyint-character-varying-character-varying-14a8056a" href="#mysql-if-mysql-tinyint-character-varying-character-varying-14a8056a">`mysql.if(condition mysql.tinyint, value2 character varying, value3 character varying) → character varying`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L160-L172) |
| <a id="mysql-if-mysql-tinyint-character-character-11145f5c" href="#mysql-if-mysql-tinyint-character-character-11145f5c">`mysql.if(condition mysql.tinyint, value2 character, value3 character) → character`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L146-L158) |
| <a id="mysql-if-mysql-tinyint-pg-catalog-date-pg-catalog-date-ea30bf96" href="#mysql-if-mysql-tinyint-pg-catalog-date-pg-catalog-date-ea30bf96">`mysql.if(condition mysql.tinyint, value2 date, value3 date) → date`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L188-L200) |
| <a id="mysql-if-mysql-tinyint-double-precision-double-precision-8040f03f" href="#mysql-if-mysql-tinyint-double-precision-double-precision-8040f03f">`mysql.if(condition mysql.tinyint, value2 double precision, value3 double precision) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L90-L102) |
| <a id="mysql-if-mysql-tinyint-integer-integer-266323a5" href="#mysql-if-mysql-tinyint-integer-integer-266323a5">`mysql.if(condition mysql.tinyint, value2 integer, value3 integer) → integer`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L48-L60) |
| <a id="mysql-if-mysql-tinyint-mysql-real-mysql-real-3d16dbbe" href="#mysql-if-mysql-tinyint-mysql-real-mysql-real-3d16dbbe">`mysql.if(condition mysql.tinyint, value2 mysql."real", value3 mysql."real") → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L132-L144) |
| <a id="mysql-if-mysql-tinyint-mysql-smallint-mysql-smallint-0af8fb17" href="#mysql-if-mysql-tinyint-mysql-smallint-mysql-smallint-0af8fb17">`mysql.if(condition mysql.tinyint, value2 mysql."smallint", value3 mysql."smallint") → mysql."smallint"`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L20-L32) |
| <a id="mysql-if-mysql-tinyint-mysql-datetime-mysql-datetime-ee2f7c2b" href="#mysql-if-mysql-tinyint-mysql-datetime-mysql-datetime-ee2f7c2b">`mysql.if(condition mysql.tinyint, value2 mysql.datetime, value3 mysql.datetime) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L216-L228) |
| <a id="mysql-if-mysql-tinyint-mysql-double-mysql-double-8a751825" href="#mysql-if-mysql-tinyint-mysql-double-mysql-double-8a751825">`mysql.if(condition mysql.tinyint, value2 mysql.double, value3 mysql.double) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L118-L130) |
| <a id="mysql-if-mysql-tinyint-mysql-mediumint-mysql-mediumint-17a0c3a4" href="#mysql-if-mysql-tinyint-mysql-mediumint-mysql-mediumint-17a0c3a4">`mysql.if(condition mysql.tinyint, value2 mysql.mediumint, value3 mysql.mediumint) → mysql.mediumint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L34-L46) |
| <a id="mysql-if-mysql-tinyint-mysql-tinyint-mysql-tinyint-82815d6c" href="#mysql-if-mysql-tinyint-mysql-tinyint-mysql-tinyint-82815d6c">`mysql.if(condition mysql.tinyint, value2 mysql.tinyint, value3 mysql.tinyint) → mysql.tinyint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L6-L18) |
| <a id="mysql-if-mysql-tinyint-numeric-numeric-75a036dc" href="#mysql-if-mysql-tinyint-numeric-numeric-75a036dc">`mysql.if(condition mysql.tinyint, value2 numeric, value3 numeric) → numeric`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L104-L116) |
| <a id="mysql-if-mysql-tinyint-real-real-503b449a" href="#mysql-if-mysql-tinyint-real-real-503b449a">`mysql.if(condition mysql.tinyint, value2 real, value3 real) → real`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L76-L88) |
| <a id="mysql-if-mysql-tinyint-pg-catalog-text-pg-catalog-text-c0c479e3" href="#mysql-if-mysql-tinyint-pg-catalog-text-pg-catalog-text-c0c479e3">`mysql.if(condition mysql.tinyint, value2 text, value3 text) → text`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L174-L186) |
| <a id="mysql-if-mysql-tinyint-time-without-time-zone-time-without-time-zone-18be5ec7" href="#mysql-if-mysql-tinyint-time-without-time-zone-time-without-time-zone-18be5ec7">`mysql.if(condition mysql.tinyint, value2 time without time zone, value3 time without time zone) → time without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L202-L214) |
| <a id="mysql-if-mysql-tinyint-timestamp-without-time-zone-timestamp-without-time-zone-96119190" href="#mysql-if-mysql-tinyint-timestamp-without-time-zone-timestamp-without-time-zone-96119190">`mysql.if(condition mysql.tinyint, value2 timestamp without time zone, value3 timestamp without time zone) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L230-L242) |
| <a id="mysql-if-numeric-bigint-bigint-2c2a3c63" href="#mysql-if-numeric-bigint-bigint-2c2a3c63">`mysql.if(condition numeric, value2 bigint, value3 bigint) → bigint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1728-L1740) |
| <a id="mysql-if-numeric-character-varying-character-varying-5dac8dad" href="#mysql-if-numeric-character-varying-character-varying-5dac8dad">`mysql.if(condition numeric, value2 character varying, value3 character varying) → character varying`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1826-L1838) |
| <a id="mysql-if-numeric-character-character-2ba910ef" href="#mysql-if-numeric-character-character-2ba910ef">`mysql.if(condition numeric, value2 character, value3 character) → character`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1812-L1824) |
| <a id="mysql-if-numeric-pg-catalog-date-pg-catalog-date-bd70fec4" href="#mysql-if-numeric-pg-catalog-date-pg-catalog-date-bd70fec4">`mysql.if(condition numeric, value2 date, value3 date) → date`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1854-L1866) |
| <a id="mysql-if-numeric-double-precision-double-precision-809fd12d" href="#mysql-if-numeric-double-precision-double-precision-809fd12d">`mysql.if(condition numeric, value2 double precision, value3 double precision) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1756-L1768) |
| <a id="mysql-if-numeric-integer-integer-07fb69de" href="#mysql-if-numeric-integer-integer-07fb69de">`mysql.if(condition numeric, value2 integer, value3 integer) → integer`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1714-L1726) |
| <a id="mysql-if-numeric-mysql-real-mysql-real-899687e3" href="#mysql-if-numeric-mysql-real-mysql-real-899687e3">`mysql.if(condition numeric, value2 mysql."real", value3 mysql."real") → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1798-L1810) |
| <a id="mysql-if-numeric-mysql-smallint-mysql-smallint-b34d4790" href="#mysql-if-numeric-mysql-smallint-mysql-smallint-b34d4790">`mysql.if(condition numeric, value2 mysql."smallint", value3 mysql."smallint") → mysql."smallint"`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1686-L1698) |
| <a id="mysql-if-numeric-mysql-datetime-mysql-datetime-53f77756" href="#mysql-if-numeric-mysql-datetime-mysql-datetime-53f77756">`mysql.if(condition numeric, value2 mysql.datetime, value3 mysql.datetime) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1882-L1894) |
| <a id="mysql-if-numeric-mysql-double-mysql-double-5dc0ae35" href="#mysql-if-numeric-mysql-double-mysql-double-5dc0ae35">`mysql.if(condition numeric, value2 mysql.double, value3 mysql.double) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1784-L1796) |
| <a id="mysql-if-numeric-mysql-mediumint-mysql-mediumint-9ac9ee92" href="#mysql-if-numeric-mysql-mediumint-mysql-mediumint-9ac9ee92">`mysql.if(condition numeric, value2 mysql.mediumint, value3 mysql.mediumint) → mysql.mediumint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1700-L1712) |
| <a id="mysql-if-numeric-mysql-tinyint-mysql-tinyint-e6a2bf8c" href="#mysql-if-numeric-mysql-tinyint-mysql-tinyint-e6a2bf8c">`mysql.if(condition numeric, value2 mysql.tinyint, value3 mysql.tinyint) → mysql.tinyint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1672-L1684) |
| <a id="mysql-if-numeric-numeric-numeric-e2c4fc84" href="#mysql-if-numeric-numeric-numeric-e2c4fc84">`mysql.if(condition numeric, value2 numeric, value3 numeric) → numeric`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1770-L1782) |
| <a id="mysql-if-numeric-real-real-77b9b36c" href="#mysql-if-numeric-real-real-77b9b36c">`mysql.if(condition numeric, value2 real, value3 real) → real`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1742-L1754) |
| <a id="mysql-if-numeric-pg-catalog-text-pg-catalog-text-1f824789" href="#mysql-if-numeric-pg-catalog-text-pg-catalog-text-1f824789">`mysql.if(condition numeric, value2 text, value3 text) → text`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1840-L1852) |
| <a id="mysql-if-numeric-time-without-time-zone-time-without-time-zone-a3fffdca" href="#mysql-if-numeric-time-without-time-zone-time-without-time-zone-a3fffdca">`mysql.if(condition numeric, value2 time without time zone, value3 time without time zone) → time without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1868-L1880) |
| <a id="mysql-if-numeric-timestamp-without-time-zone-timestamp-without-time-zone-bc685c31" href="#mysql-if-numeric-timestamp-without-time-zone-timestamp-without-time-zone-bc685c31">`mysql.if(condition numeric, value2 timestamp without time zone, value3 timestamp without time zone) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1896-L1908) |
| <a id="mysql-if-pg-catalog-text-bigint-bigint-59ecb4d2" href="#mysql-if-pg-catalog-text-bigint-bigint-59ecb4d2">`mysql.if(condition text, value2 bigint, value3 bigint) → bigint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1978-L1993) |
| <a id="mysql-if-pg-catalog-text-character-varying-character-varying-da0c593e" href="#mysql-if-pg-catalog-text-character-varying-character-varying-da0c593e">`mysql.if(condition text, value2 character varying, value3 character varying) → character varying`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2097-L2112) |
| <a id="mysql-if-pg-catalog-text-character-character-3ac7ef28" href="#mysql-if-pg-catalog-text-character-character-3ac7ef28">`mysql.if(condition text, value2 character, value3 character) → character`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2080-L2095) |
| <a id="mysql-if-pg-catalog-text-pg-catalog-date-pg-catalog-date-1f71ee36" href="#mysql-if-pg-catalog-text-pg-catalog-date-pg-catalog-date-1f71ee36">`mysql.if(condition text, value2 date, value3 date) → date`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2131-L2146) |
| <a id="mysql-if-pg-catalog-text-double-precision-double-precision-0d1aedcd" href="#mysql-if-pg-catalog-text-double-precision-double-precision-0d1aedcd">`mysql.if(condition text, value2 double precision, value3 double precision) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2012-L2027) |
| <a id="mysql-if-pg-catalog-text-integer-integer-7fd7c7d8" href="#mysql-if-pg-catalog-text-integer-integer-7fd7c7d8">`mysql.if(condition text, value2 integer, value3 integer) → integer`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1961-L1976) |
| <a id="mysql-if-pg-catalog-text-mysql-real-mysql-real-9ace4ace" href="#mysql-if-pg-catalog-text-mysql-real-mysql-real-9ace4ace">`mysql.if(condition text, value2 mysql."real", value3 mysql."real") → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2063-L2078) |
| <a id="mysql-if-pg-catalog-text-mysql-smallint-mysql-smallint-c0987ea9" href="#mysql-if-pg-catalog-text-mysql-smallint-mysql-smallint-c0987ea9">`mysql.if(condition text, value2 mysql."smallint", value3 mysql."smallint") → mysql."smallint"`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1927-L1942) |
| <a id="mysql-if-pg-catalog-text-mysql-datetime-mysql-datetime-0110670d" href="#mysql-if-pg-catalog-text-mysql-datetime-mysql-datetime-0110670d">`mysql.if(condition text, value2 mysql.datetime, value3 mysql.datetime) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2165-L2180) |
| <a id="mysql-if-pg-catalog-text-mysql-double-mysql-double-ec3cb0b5" href="#mysql-if-pg-catalog-text-mysql-double-mysql-double-ec3cb0b5">`mysql.if(condition text, value2 mysql.double, value3 mysql.double) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2046-L2061) |
| <a id="mysql-if-pg-catalog-text-mysql-mediumint-mysql-mediumint-d780929a" href="#mysql-if-pg-catalog-text-mysql-mediumint-mysql-mediumint-d780929a">`mysql.if(condition text, value2 mysql.mediumint, value3 mysql.mediumint) → mysql.mediumint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1944-L1959) |
| <a id="mysql-if-pg-catalog-text-mysql-tinyint-mysql-tinyint-68ff4de4" href="#mysql-if-pg-catalog-text-mysql-tinyint-mysql-tinyint-68ff4de4">`mysql.if(condition text, value2 mysql.tinyint, value3 mysql.tinyint) → mysql.tinyint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1910-L1925) |
| <a id="mysql-if-pg-catalog-text-numeric-numeric-cd33f6d1" href="#mysql-if-pg-catalog-text-numeric-numeric-cd33f6d1">`mysql.if(condition text, value2 numeric, value3 numeric) → numeric`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2029-L2044) |
| <a id="mysql-if-pg-catalog-text-real-real-38b9d3df" href="#mysql-if-pg-catalog-text-real-real-38b9d3df">`mysql.if(condition text, value2 real, value3 real) → real`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L1995-L2010) |
| <a id="mysql-if-pg-catalog-text-pg-catalog-text-pg-catalog-text-3967b7d6" href="#mysql-if-pg-catalog-text-pg-catalog-text-pg-catalog-text-3967b7d6">`mysql.if(condition text, value2 text, value3 text) → text`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2114-L2129) |
| <a id="mysql-if-pg-catalog-text-time-without-time-zone-time-without-time-zone-62664668" href="#mysql-if-pg-catalog-text-time-without-time-zone-time-without-time-zone-62664668">`mysql.if(condition text, value2 time without time zone, value3 time without time zone) → time without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2148-L2163) |
| <a id="mysql-if-pg-catalog-text-timestamp-without-time-zone-timestamp-without-time-zone-5b04216c" href="#mysql-if-pg-catalog-text-timestamp-without-time-zone-timestamp-without-time-zone-5b04216c">`mysql.if(condition text, value2 timestamp without time zone, value3 timestamp without time zone) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2182-L2197) |
| <a id="mysql-if-time-without-time-zone-bigint-bigint-b1c8ecbf" href="#mysql-if-time-without-time-zone-bigint-bigint-b1c8ecbf">`mysql.if(condition time without time zone, value2 bigint, value3 bigint) → bigint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2267-L2282) |
| <a id="mysql-if-time-without-time-zone-character-varying-character-varying-911015da" href="#mysql-if-time-without-time-zone-character-varying-character-varying-911015da">`mysql.if(condition time without time zone, value2 character varying, value3 character varying) → character varying`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2386-L2401) |
| <a id="mysql-if-time-without-time-zone-character-character-92e6cd69" href="#mysql-if-time-without-time-zone-character-character-92e6cd69">`mysql.if(condition time without time zone, value2 character, value3 character) → character`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2369-L2384) |
| <a id="mysql-if-time-without-time-zone-pg-catalog-date-pg-catalog-date-b05a4d3b" href="#mysql-if-time-without-time-zone-pg-catalog-date-pg-catalog-date-b05a4d3b">`mysql.if(condition time without time zone, value2 date, value3 date) → date`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2420-L2435) |
| <a id="mysql-if-time-without-time-zone-double-precision-double-precision-bacf3aae" href="#mysql-if-time-without-time-zone-double-precision-double-precision-bacf3aae">`mysql.if(condition time without time zone, value2 double precision, value3 double precision) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2301-L2316) |
| <a id="mysql-if-time-without-time-zone-integer-integer-2bd69eb0" href="#mysql-if-time-without-time-zone-integer-integer-2bd69eb0">`mysql.if(condition time without time zone, value2 integer, value3 integer) → integer`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2250-L2265) |
| <a id="mysql-if-time-without-time-zone-mysql-real-mysql-real-f2b3385e" href="#mysql-if-time-without-time-zone-mysql-real-mysql-real-f2b3385e">`mysql.if(condition time without time zone, value2 mysql."real", value3 mysql."real") → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2352-L2367) |
| <a id="mysql-if-time-without-time-zone-mysql-smallint-mysql-smallint-49a7970f" href="#mysql-if-time-without-time-zone-mysql-smallint-mysql-smallint-49a7970f">`mysql.if(condition time without time zone, value2 mysql."smallint", value3 mysql."smallint") → mysql."smallint"`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2216-L2231) |
| <a id="mysql-if-time-without-time-zone-mysql-datetime-mysql-datetime-3aa12668" href="#mysql-if-time-without-time-zone-mysql-datetime-mysql-datetime-3aa12668">`mysql.if(condition time without time zone, value2 mysql.datetime, value3 mysql.datetime) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2454-L2469) |
| <a id="mysql-if-time-without-time-zone-mysql-double-mysql-double-1553664d" href="#mysql-if-time-without-time-zone-mysql-double-mysql-double-1553664d">`mysql.if(condition time without time zone, value2 mysql.double, value3 mysql.double) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2335-L2350) |
| <a id="mysql-if-time-without-time-zone-mysql-mediumint-mysql-mediumint-c9526e34" href="#mysql-if-time-without-time-zone-mysql-mediumint-mysql-mediumint-c9526e34">`mysql.if(condition time without time zone, value2 mysql.mediumint, value3 mysql.mediumint) → mysql.mediumint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2233-L2248) |
| <a id="mysql-if-time-without-time-zone-mysql-tinyint-mysql-tinyint-4c98c7a5" href="#mysql-if-time-without-time-zone-mysql-tinyint-mysql-tinyint-4c98c7a5">`mysql.if(condition time without time zone, value2 mysql.tinyint, value3 mysql.tinyint) → mysql.tinyint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2199-L2214) |
| <a id="mysql-if-time-without-time-zone-numeric-numeric-982e8303" href="#mysql-if-time-without-time-zone-numeric-numeric-982e8303">`mysql.if(condition time without time zone, value2 numeric, value3 numeric) → numeric`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2318-L2333) |
| <a id="mysql-if-time-without-time-zone-real-real-ae167e20" href="#mysql-if-time-without-time-zone-real-real-ae167e20">`mysql.if(condition time without time zone, value2 real, value3 real) → real`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2284-L2299) |
| <a id="mysql-if-time-without-time-zone-pg-catalog-text-pg-catalog-text-93f0ac00" href="#mysql-if-time-without-time-zone-pg-catalog-text-pg-catalog-text-93f0ac00">`mysql.if(condition time without time zone, value2 text, value3 text) → text`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2403-L2418) |
| <a id="mysql-if-time-without-time-zone-time-without-time-zone-time-without-time-zone-c59b6807" href="#mysql-if-time-without-time-zone-time-without-time-zone-time-without-time-zone-c59b6807">`mysql.if(condition time without time zone, value2 time without time zone, value3 time without time zone) → time without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2437-L2452) |
| <a id="mysql-if-time-without-time-zone-timestamp-without-time-zone-timestamp-without-time-zo-49589f64" href="#mysql-if-time-without-time-zone-timestamp-without-time-zone-timestamp-without-time-zo-49589f64">`mysql.if(condition time without time zone, value2 timestamp without time zone, value3 timestamp without time zone) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2471-L2486) |
| <a id="mysql-if-timestamp-without-time-zone-bigint-bigint-cf2da760" href="#mysql-if-timestamp-without-time-zone-bigint-bigint-cf2da760">`mysql.if(condition timestamp without time zone, value2 bigint, value3 bigint) → bigint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2845-L2860) |
| <a id="mysql-if-timestamp-without-time-zone-character-varying-character-varying-3e961c21" href="#mysql-if-timestamp-without-time-zone-character-varying-character-varying-3e961c21">`mysql.if(condition timestamp without time zone, value2 character varying, value3 character varying) → character varying`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2964-L2979) |
| <a id="mysql-if-timestamp-without-time-zone-character-character-72fff40c" href="#mysql-if-timestamp-without-time-zone-character-character-72fff40c">`mysql.if(condition timestamp without time zone, value2 character, value3 character) → character`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2947-L2962) |
| <a id="mysql-if-timestamp-without-time-zone-pg-catalog-date-pg-catalog-date-2dccde4e" href="#mysql-if-timestamp-without-time-zone-pg-catalog-date-pg-catalog-date-2dccde4e">`mysql.if(condition timestamp without time zone, value2 date, value3 date) → date`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2998-L3013) |
| <a id="mysql-if-timestamp-without-time-zone-double-precision-double-precision-f06668ce" href="#mysql-if-timestamp-without-time-zone-double-precision-double-precision-f06668ce">`mysql.if(condition timestamp without time zone, value2 double precision, value3 double precision) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2879-L2894) |
| <a id="mysql-if-timestamp-without-time-zone-integer-integer-8f41975c" href="#mysql-if-timestamp-without-time-zone-integer-integer-8f41975c">`mysql.if(condition timestamp without time zone, value2 integer, value3 integer) → integer`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2828-L2843) |
| <a id="mysql-if-timestamp-without-time-zone-mysql-real-mysql-real-687b1500" href="#mysql-if-timestamp-without-time-zone-mysql-real-mysql-real-687b1500">`mysql.if(condition timestamp without time zone, value2 mysql."real", value3 mysql."real") → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2930-L2945) |
| <a id="mysql-if-timestamp-without-time-zone-mysql-smallint-mysql-smallint-6fce49e2" href="#mysql-if-timestamp-without-time-zone-mysql-smallint-mysql-smallint-6fce49e2">`mysql.if(condition timestamp without time zone, value2 mysql."smallint", value3 mysql."smallint") → mysql."smallint"`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2794-L2809) |
| <a id="mysql-if-timestamp-without-time-zone-mysql-datetime-mysql-datetime-d955565c" href="#mysql-if-timestamp-without-time-zone-mysql-datetime-mysql-datetime-d955565c">`mysql.if(condition timestamp without time zone, value2 mysql.datetime, value3 mysql.datetime) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L3032-L3047) |
| <a id="mysql-if-timestamp-without-time-zone-mysql-double-mysql-double-e25ce090" href="#mysql-if-timestamp-without-time-zone-mysql-double-mysql-double-e25ce090">`mysql.if(condition timestamp without time zone, value2 mysql.double, value3 mysql.double) → double precision`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2913-L2928) |
| <a id="mysql-if-timestamp-without-time-zone-mysql-mediumint-mysql-mediumint-235c42d4" href="#mysql-if-timestamp-without-time-zone-mysql-mediumint-mysql-mediumint-235c42d4">`mysql.if(condition timestamp without time zone, value2 mysql.mediumint, value3 mysql.mediumint) → mysql.mediumint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2811-L2826) |
| <a id="mysql-if-timestamp-without-time-zone-mysql-tinyint-mysql-tinyint-01c77c6d" href="#mysql-if-timestamp-without-time-zone-mysql-tinyint-mysql-tinyint-01c77c6d">`mysql.if(condition timestamp without time zone, value2 mysql.tinyint, value3 mysql.tinyint) → mysql.tinyint`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2777-L2792) |
| <a id="mysql-if-timestamp-without-time-zone-numeric-numeric-8d6c8ade" href="#mysql-if-timestamp-without-time-zone-numeric-numeric-8d6c8ade">`mysql.if(condition timestamp without time zone, value2 numeric, value3 numeric) → numeric`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2896-L2911) |
| <a id="mysql-if-timestamp-without-time-zone-real-real-9d66203b" href="#mysql-if-timestamp-without-time-zone-real-real-9d66203b">`mysql.if(condition timestamp without time zone, value2 real, value3 real) → real`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2862-L2877) |
| <a id="mysql-if-timestamp-without-time-zone-pg-catalog-text-pg-catalog-text-1731ed3d" href="#mysql-if-timestamp-without-time-zone-pg-catalog-text-pg-catalog-text-1731ed3d">`mysql.if(condition timestamp without time zone, value2 text, value3 text) → text`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L2981-L2996) |
| <a id="mysql-if-timestamp-without-time-zone-time-without-time-zone-time-without-time-zone-0869f7c2" href="#mysql-if-timestamp-without-time-zone-time-without-time-zone-time-without-time-zone-0869f7c2">`mysql.if(condition timestamp without time zone, value2 time without time zone, value3 time without time zone) → time without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L3015-L3030) |
| <a id="mysql-if-timestamp-without-time-zone-timestamp-without-time-zone-timestamp-without-ti-95cdaf8a" href="#mysql-if-timestamp-without-time-zone-timestamp-without-time-zone-timestamp-without-ti-95cdaf8a">`mysql.if(condition timestamp without time zone, value2 timestamp without time zone, value3 timestamp without time zone) → timestamp without time zone`</a> | Select the second or third argument according to the condition. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/40-func-if.sql#L3049-L3064) |
| <a id="mysql-if-pg-catalog-date-boolean-boolean-96771a21" href="#mysql-if-pg-catalog-date-boolean-boolean-96771a21">`mysql.if(date, boolean, boolean) → boolean`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L571-L572) |
| <a id="mysql-if-pg-catalog-date-character-varying-character-78f8e4af" href="#mysql-if-pg-catalog-date-character-varying-character-78f8e4af">`mysql.if(date, character varying, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-pg-catalog-date-character-varying-pg-catalog-text-0c4c50eb" href="#mysql-if-pg-catalog-date-character-varying-pg-catalog-text-0c4c50eb">`mysql.if(date, character varying, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-pg-catalog-date-character-character-varying-38145758" href="#mysql-if-pg-catalog-date-character-character-varying-38145758">`mysql.if(date, character, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-pg-catalog-date-character-pg-catalog-text-e0a01010" href="#mysql-if-pg-catalog-date-character-pg-catalog-text-e0a01010">`mysql.if(date, character, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-pg-catalog-date-pg-catalog-text-character-varying-252c5597" href="#mysql-if-pg-catalog-date-pg-catalog-text-character-varying-252c5597">`mysql.if(date, text, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-pg-catalog-date-pg-catalog-text-character-0ca35e4f" href="#mysql-if-pg-catalog-date-pg-catalog-text-character-0ca35e4f">`mysql.if(date, text, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-double-precision-boolean-boolean-34a84a62" href="#mysql-if-double-precision-boolean-boolean-34a84a62">`mysql.if(double precision, boolean, boolean) → boolean`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L571-L572) |
| <a id="mysql-if-double-precision-character-varying-character-9ab06d3a" href="#mysql-if-double-precision-character-varying-character-9ab06d3a">`mysql.if(double precision, character varying, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-double-precision-character-varying-pg-catalog-text-204f4c76" href="#mysql-if-double-precision-character-varying-pg-catalog-text-204f4c76">`mysql.if(double precision, character varying, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-double-precision-character-character-varying-5843a7d3" href="#mysql-if-double-precision-character-character-varying-5843a7d3">`mysql.if(double precision, character, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-double-precision-character-pg-catalog-text-1731047d" href="#mysql-if-double-precision-character-pg-catalog-text-1731047d">`mysql.if(double precision, character, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-double-precision-pg-catalog-text-character-varying-44556bad" href="#mysql-if-double-precision-pg-catalog-text-character-varying-44556bad">`mysql.if(double precision, text, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-double-precision-pg-catalog-text-character-d3c6d99e" href="#mysql-if-double-precision-pg-catalog-text-character-d3c6d99e">`mysql.if(double precision, text, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-integer-boolean-boolean-5df318a7" href="#mysql-if-integer-boolean-boolean-5df318a7">`mysql.if(integer, boolean, boolean) → boolean`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L571-L572) |
| <a id="mysql-if-integer-character-varying-character-878db8af" href="#mysql-if-integer-character-varying-character-878db8af">`mysql.if(integer, character varying, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-integer-character-varying-pg-catalog-text-4b6186ed" href="#mysql-if-integer-character-varying-pg-catalog-text-4b6186ed">`mysql.if(integer, character varying, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-integer-character-character-varying-0cf063e1" href="#mysql-if-integer-character-character-varying-0cf063e1">`mysql.if(integer, character, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-integer-character-pg-catalog-text-3423efdd" href="#mysql-if-integer-character-pg-catalog-text-3423efdd">`mysql.if(integer, character, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-integer-pg-catalog-text-character-varying-a8f7e72c" href="#mysql-if-integer-pg-catalog-text-character-varying-a8f7e72c">`mysql.if(integer, text, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-integer-pg-catalog-text-character-38e52a69" href="#mysql-if-integer-pg-catalog-text-character-38e52a69">`mysql.if(integer, text, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-smallint-boolean-boolean-b0620934" href="#mysql-if-mysql-smallint-boolean-boolean-b0620934">`mysql.if(mysql."smallint", boolean, boolean) → boolean`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L571-L572) |
| <a id="mysql-if-mysql-smallint-character-varying-character-3ac261a7" href="#mysql-if-mysql-smallint-character-varying-character-3ac261a7">`mysql.if(mysql."smallint", character varying, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-smallint-character-varying-pg-catalog-text-a45e6064" href="#mysql-if-mysql-smallint-character-varying-pg-catalog-text-a45e6064">`mysql.if(mysql."smallint", character varying, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-smallint-character-character-varying-4a7c9929" href="#mysql-if-mysql-smallint-character-character-varying-4a7c9929">`mysql.if(mysql."smallint", character, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-smallint-character-pg-catalog-text-2ee38789" href="#mysql-if-mysql-smallint-character-pg-catalog-text-2ee38789">`mysql.if(mysql."smallint", character, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-smallint-pg-catalog-text-character-varying-b554c2b6" href="#mysql-if-mysql-smallint-pg-catalog-text-character-varying-b554c2b6">`mysql.if(mysql."smallint", text, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-smallint-pg-catalog-text-character-1bd9cb8b" href="#mysql-if-mysql-smallint-pg-catalog-text-character-1bd9cb8b">`mysql.if(mysql."smallint", text, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-double-boolean-boolean-24b32f61" href="#mysql-if-mysql-double-boolean-boolean-24b32f61">`mysql.if(mysql.double, boolean, boolean) → boolean`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L571-L572) |
| <a id="mysql-if-mysql-double-character-varying-character-471b78b6" href="#mysql-if-mysql-double-character-varying-character-471b78b6">`mysql.if(mysql.double, character varying, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-double-character-varying-pg-catalog-text-e0b67502" href="#mysql-if-mysql-double-character-varying-pg-catalog-text-e0b67502">`mysql.if(mysql.double, character varying, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-double-character-character-varying-9e8ee94b" href="#mysql-if-mysql-double-character-character-varying-9e8ee94b">`mysql.if(mysql.double, character, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-double-character-pg-catalog-text-15887ed9" href="#mysql-if-mysql-double-character-pg-catalog-text-15887ed9">`mysql.if(mysql.double, character, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-double-pg-catalog-text-character-varying-f8960933" href="#mysql-if-mysql-double-pg-catalog-text-character-varying-f8960933">`mysql.if(mysql.double, text, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-double-pg-catalog-text-character-4731be0e" href="#mysql-if-mysql-double-pg-catalog-text-character-4731be0e">`mysql.if(mysql.double, text, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-tinyint-boolean-boolean-06b2f766" href="#mysql-if-mysql-tinyint-boolean-boolean-06b2f766">`mysql.if(mysql.tinyint, boolean, boolean) → boolean`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L571-L572) |
| <a id="mysql-if-mysql-tinyint-character-varying-character-2775e3fa" href="#mysql-if-mysql-tinyint-character-varying-character-2775e3fa">`mysql.if(mysql.tinyint, character varying, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-tinyint-character-varying-pg-catalog-text-c3233737" href="#mysql-if-mysql-tinyint-character-varying-pg-catalog-text-c3233737">`mysql.if(mysql.tinyint, character varying, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-tinyint-character-character-varying-b19e055e" href="#mysql-if-mysql-tinyint-character-character-varying-b19e055e">`mysql.if(mysql.tinyint, character, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-tinyint-character-pg-catalog-text-595d64a7" href="#mysql-if-mysql-tinyint-character-pg-catalog-text-595d64a7">`mysql.if(mysql.tinyint, character, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-tinyint-pg-catalog-text-character-varying-1081d61c" href="#mysql-if-mysql-tinyint-pg-catalog-text-character-varying-1081d61c">`mysql.if(mysql.tinyint, text, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-mysql-tinyint-pg-catalog-text-character-d77dbd45" href="#mysql-if-mysql-tinyint-pg-catalog-text-character-d77dbd45">`mysql.if(mysql.tinyint, text, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-numeric-boolean-boolean-b8f93e27" href="#mysql-if-numeric-boolean-boolean-b8f93e27">`mysql.if(numeric, boolean, boolean) → boolean`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L571-L572) |
| <a id="mysql-if-numeric-character-varying-character-af530f9c" href="#mysql-if-numeric-character-varying-character-af530f9c">`mysql.if(numeric, character varying, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-numeric-character-varying-pg-catalog-text-049f1023" href="#mysql-if-numeric-character-varying-pg-catalog-text-049f1023">`mysql.if(numeric, character varying, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-numeric-character-character-varying-c8b84ffa" href="#mysql-if-numeric-character-character-varying-c8b84ffa">`mysql.if(numeric, character, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-numeric-character-pg-catalog-text-d00807c7" href="#mysql-if-numeric-character-pg-catalog-text-d00807c7">`mysql.if(numeric, character, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-numeric-pg-catalog-text-character-varying-af33d6b3" href="#mysql-if-numeric-pg-catalog-text-character-varying-af33d6b3">`mysql.if(numeric, text, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-numeric-pg-catalog-text-character-c656ae15" href="#mysql-if-numeric-pg-catalog-text-character-c656ae15">`mysql.if(numeric, text, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-pg-catalog-text-boolean-boolean-22e8cf2c" href="#mysql-if-pg-catalog-text-boolean-boolean-22e8cf2c">`mysql.if(text, boolean, boolean) → boolean`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L571-L572) |
| <a id="mysql-if-pg-catalog-text-character-varying-character-67333c8f" href="#mysql-if-pg-catalog-text-character-varying-character-67333c8f">`mysql.if(text, character varying, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-pg-catalog-text-character-varying-pg-catalog-text-1d67455a" href="#mysql-if-pg-catalog-text-character-varying-pg-catalog-text-1d67455a">`mysql.if(text, character varying, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-pg-catalog-text-character-character-varying-3dc2721b" href="#mysql-if-pg-catalog-text-character-character-varying-3dc2721b">`mysql.if(text, character, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-pg-catalog-text-character-pg-catalog-text-3aeeaf78" href="#mysql-if-pg-catalog-text-character-pg-catalog-text-3aeeaf78">`mysql.if(text, character, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-pg-catalog-text-pg-catalog-text-character-varying-1d6fd6b4" href="#mysql-if-pg-catalog-text-pg-catalog-text-character-varying-1d6fd6b4">`mysql.if(text, text, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-pg-catalog-text-pg-catalog-text-character-230ad769" href="#mysql-if-pg-catalog-text-pg-catalog-text-character-230ad769">`mysql.if(text, text, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-time-without-time-zone-boolean-boolean-f606808b" href="#mysql-if-time-without-time-zone-boolean-boolean-f606808b">`mysql.if(time without time zone, boolean, boolean) → boolean`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L571-L572) |
| <a id="mysql-if-time-without-time-zone-character-varying-character-daaa3690" href="#mysql-if-time-without-time-zone-character-varying-character-daaa3690">`mysql.if(time without time zone, character varying, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-time-without-time-zone-character-varying-pg-catalog-text-9b293573" href="#mysql-if-time-without-time-zone-character-varying-pg-catalog-text-9b293573">`mysql.if(time without time zone, character varying, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-time-without-time-zone-character-character-varying-685bf9ca" href="#mysql-if-time-without-time-zone-character-character-varying-685bf9ca">`mysql.if(time without time zone, character, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-time-without-time-zone-character-pg-catalog-text-9b1fa9dc" href="#mysql-if-time-without-time-zone-character-pg-catalog-text-9b1fa9dc">`mysql.if(time without time zone, character, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-time-without-time-zone-pg-catalog-text-character-varying-68682dca" href="#mysql-if-time-without-time-zone-pg-catalog-text-character-varying-68682dca">`mysql.if(time without time zone, text, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-time-without-time-zone-pg-catalog-text-character-3a6a1a50" href="#mysql-if-time-without-time-zone-pg-catalog-text-character-3a6a1a50">`mysql.if(time without time zone, text, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-timestamp-without-time-zone-boolean-boolean-0e8a653c" href="#mysql-if-timestamp-without-time-zone-boolean-boolean-0e8a653c">`mysql.if(timestamp without time zone, boolean, boolean) → boolean`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L571-L572) |
| <a id="mysql-if-timestamp-without-time-zone-character-varying-character-5320f893" href="#mysql-if-timestamp-without-time-zone-character-varying-character-5320f893">`mysql.if(timestamp without time zone, character varying, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-timestamp-without-time-zone-character-varying-pg-catalog-text-a6e1839b" href="#mysql-if-timestamp-without-time-zone-character-varying-pg-catalog-text-a6e1839b">`mysql.if(timestamp without time zone, character varying, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-timestamp-without-time-zone-character-character-varying-fd15aa06" href="#mysql-if-timestamp-without-time-zone-character-character-varying-fd15aa06">`mysql.if(timestamp without time zone, character, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-timestamp-without-time-zone-character-pg-catalog-text-86debb3a" href="#mysql-if-timestamp-without-time-zone-character-pg-catalog-text-86debb3a">`mysql.if(timestamp without time zone, character, text) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-timestamp-without-time-zone-pg-catalog-text-character-varying-5e021f2e" href="#mysql-if-timestamp-without-time-zone-pg-catalog-text-character-varying-5e021f2e">`mysql.if(timestamp without time zone, text, character varying) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |
| <a id="mysql-if-timestamp-without-time-zone-pg-catalog-text-character-ccd8ebb7" href="#mysql-if-timestamp-without-time-zone-pg-catalog-text-character-ccd8ebb7">`mysql.if(timestamp without time zone, text, character) → character varying`</a> | Select the second or third argument according to the condition. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L567-L569) |

## ifnull {#ifnull}

| Signature | Purpose | Source definition |
|---|---|---|
| <a id="mysql-ifnull-bigint-bigint-7d50d71d" href="#mysql-ifnull-bigint-bigint-7d50d71d">`mysql.ifnull(bigint, bigint) → bigint`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L257-L269) |
| <a id="mysql-ifnull-bigint-character-varying-668322e1" href="#mysql-ifnull-bigint-character-varying-668322e1">`mysql.ifnull(bigint, character varying) → character varying`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L515-L527) |
| <a id="mysql-ifnull-boolean-boolean-9e7ed07f" href="#mysql-ifnull-boolean-boolean-9e7ed07f">`mysql.ifnull(boolean, boolean) → boolean`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L271-L283) |
| <a id="mysql-ifnull-pg-catalog-bytea-pg-catalog-bytea-49ace310" href="#mysql-ifnull-pg-catalog-bytea-pg-catalog-bytea-49ace310">`mysql.ifnull(bytea, bytea) → bytea`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L332-L333) |
| <a id="mysql-ifnull-character-varying-bigint-328fdcc8" href="#mysql-ifnull-character-varying-bigint-328fdcc8">`mysql.ifnull(character varying, bigint) → character varying`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L501-L513) |
| <a id="mysql-ifnull-character-varying-character-varying-af40bb82" href="#mysql-ifnull-character-varying-character-varying-af40bb82">`mysql.ifnull(character varying, character varying) → character varying`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L299-L311) |
| <a id="mysql-ifnull-character-varying-character-66ef5bc9" href="#mysql-ifnull-character-varying-character-66ef5bc9">`mysql.ifnull(character varying, character) → character varying`</a> | Return the first value when present, otherwise the fallback. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L555-L556) |
| <a id="mysql-ifnull-character-varying-pg-catalog-text-f9b39752" href="#mysql-ifnull-character-varying-pg-catalog-text-f9b39752">`mysql.ifnull(character varying, text) → character varying`</a> | Return the first value when present, otherwise the fallback. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L555-L556) |
| <a id="mysql-ifnull-character-character-varying-064b7972" href="#mysql-ifnull-character-character-varying-064b7972">`mysql.ifnull(character, character varying) → character varying`</a> | Return the first value when present, otherwise the fallback. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L555-L556) |
| <a id="mysql-ifnull-character-character-15fc40ab" href="#mysql-ifnull-character-character-15fc40ab">`mysql.ifnull(character, character) → character`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L313-L325) |
| <a id="mysql-ifnull-character-pg-catalog-text-149f5e42" href="#mysql-ifnull-character-pg-catalog-text-149f5e42">`mysql.ifnull(character, text) → character varying`</a> | Return the first value when present, otherwise the fallback. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L555-L556) |
| <a id="mysql-ifnull-pg-catalog-date-pg-catalog-date-ead699ef" href="#mysql-ifnull-pg-catalog-date-pg-catalog-date-ead699ef">`mysql.ifnull(date, date) → date`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L383-L395) |
| <a id="mysql-ifnull-double-precision-double-precision-2633c08b" href="#mysql-ifnull-double-precision-double-precision-2633c08b">`mysql.ifnull(double precision, double precision) → double precision`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L327-L339) |
| <a id="mysql-ifnull-integer-integer-d2fcd65b" href="#mysql-ifnull-integer-integer-d2fcd65b">`mysql.ifnull(integer, integer) → integer`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L243-L255) |
| <a id="mysql-ifnull-mysql-smallint-mysql-smallint-ee078370" href="#mysql-ifnull-mysql-smallint-mysql-smallint-ee078370">`mysql.ifnull(mysql."smallint", mysql."smallint") → mysql."smallint"`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L229-L241) |
| <a id="mysql-ifnull-mysql-double-mysql-double-c38b6a05" href="#mysql-ifnull-mysql-double-mysql-double-c38b6a05">`mysql.ifnull(mysql.double, mysql.double) → mysql.double`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L341-L353) |
| <a id="mysql-ifnull-mysql-tinyint-mysql-tinyint-3442be0a" href="#mysql-ifnull-mysql-tinyint-mysql-tinyint-3442be0a">`mysql.ifnull(mysql.tinyint, mysql.tinyint) → mysql.tinyint`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L215-L227) |
| <a id="mysql-ifnull-numeric-numeric-37244243" href="#mysql-ifnull-numeric-numeric-37244243">`mysql.ifnull(numeric, numeric) → numeric`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L355-L367) |
| <a id="mysql-ifnull-bigint-pg-catalog-text-6867bc87" href="#mysql-ifnull-bigint-pg-catalog-text-6867bc87">`mysql.ifnull(p1 bigint, p2 text) → text`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L426-L429) |
| <a id="mysql-ifnull-boolean-pg-catalog-text-03fad54d" href="#mysql-ifnull-boolean-pg-catalog-text-03fad54d">`mysql.ifnull(p1 boolean, p2 text) → text`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L411-L414) |
| <a id="mysql-ifnull-pg-catalog-date-pg-catalog-text-5c911bf4" href="#mysql-ifnull-pg-catalog-date-pg-catalog-text-5c911bf4">`mysql.ifnull(p1 date, p2 text) → timestamp without time zone`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L436-L439) |
| <a id="mysql-ifnull-integer-pg-catalog-text-022aafc5" href="#mysql-ifnull-integer-pg-catalog-text-022aafc5">`mysql.ifnull(p1 integer, p2 text) → text`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L421-L424) |
| <a id="mysql-ifnull-mysql-smallint-pg-catalog-text-5e57eef7" href="#mysql-ifnull-mysql-smallint-pg-catalog-text-5e57eef7">`mysql.ifnull(p1 mysql."smallint", p2 text) → text`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L416-L419) |
| <a id="mysql-ifnull-numeric-pg-catalog-text-299858db" href="#mysql-ifnull-numeric-pg-catalog-text-299858db">`mysql.ifnull(p1 numeric, p2 text) → text`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L431-L434) |
| <a id="mysql-ifnull-time-without-time-zone-pg-catalog-text-ed25a07e" href="#mysql-ifnull-time-without-time-zone-pg-catalog-text-ed25a07e">`mysql.ifnull(p1 time without time zone, p2 text) → timestamp without time zone`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L441-L444) |
| <a id="mysql-ifnull-timestamp-with-time-zone-pg-catalog-text-187378ef" href="#mysql-ifnull-timestamp-with-time-zone-pg-catalog-text-187378ef">`mysql.ifnull(p1 timestamp with time zone, p2 text) → timestamp with time zone`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L451-L454) |
| <a id="mysql-ifnull-timestamp-without-time-zone-pg-catalog-text-c957db98" href="#mysql-ifnull-timestamp-without-time-zone-pg-catalog-text-c957db98">`mysql.ifnull(p1 timestamp without time zone, p2 text) → timestamp without time zone`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L446-L449) |
| <a id="mysql-ifnull-pg-catalog-text-bigint-d9737fd1" href="#mysql-ifnull-pg-catalog-text-bigint-d9737fd1">`mysql.ifnull(text, bigint) → text`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L529-L541) |
| <a id="mysql-ifnull-pg-catalog-text-character-varying-cb6147ba" href="#mysql-ifnull-pg-catalog-text-character-varying-cb6147ba">`mysql.ifnull(text, character varying) → character varying`</a> | Return the first value when present, otherwise the fallback. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L555-L556) |
| <a id="mysql-ifnull-pg-catalog-text-character-3bb20f10" href="#mysql-ifnull-pg-catalog-text-character-3bb20f10">`mysql.ifnull(text, character) → character varying`</a> | Return the first value when present, otherwise the fallback. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L555-L556) |
| <a id="mysql-ifnull-pg-catalog-text-pg-catalog-text-a5e3b968" href="#mysql-ifnull-pg-catalog-text-pg-catalog-text-a5e3b968">`mysql.ifnull(text, text) → text`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L285-L297) |
| <a id="mysql-ifnull-time-without-time-zone-time-without-time-zone-527d60ab" href="#mysql-ifnull-time-without-time-zone-time-without-time-zone-527d60ab">`mysql.ifnull(time without time zone, time without time zone) → time without time zone`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L369-L381) |
| <a id="mysql-ifnull-timestamp-without-time-zone-timestamp-without-time-zone-b0f09f9a" href="#mysql-ifnull-timestamp-without-time-zone-timestamp-without-time-zone-b0f09f9a">`mysql.ifnull(timestamp without time zone, timestamp without time zone) → timestamp without time zone`</a> | Return the first value when present, otherwise the fallback. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L397-L409) |

## isnull {#isnull}

| Signature | Purpose | Source definition |
|---|---|---|
| <a id="mysql-isnull-bigint-a480f088" href="#mysql-isnull-bigint-a480f088">`mysql."isnull"(bigint) → integer`</a> | Test whether the value is NULL. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L44-L61) |
| <a id="mysql-isnull-boolean-326203a1" href="#mysql-isnull-boolean-326203a1">`mysql."isnull"(boolean) → boolean`</a> | Test whether the value is NULL. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L487-L499) |
| <a id="mysql-isnull-mysql-real-633942bb" href="#mysql-isnull-mysql-real-633942bb">`mysql."isnull"(mysql."real") → integer`</a> | Test whether the value is NULL. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L63-L80) |
| <a id="mysql-isnull-mysql-smallint-b0686455" href="#mysql-isnull-mysql-smallint-b0686455">`mysql."isnull"(mysql."smallint") → integer`</a> | Test whether the value is NULL. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L6-L23) |
| <a id="mysql-isnull-smallint-e4f6fbe7" href="#mysql-isnull-smallint-e4f6fbe7">`mysql."isnull"(smallint) → boolean`</a> | Test whether the value is NULL. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L473-L485) |
| <a id="mysql-isnull-character-varying-6a95e9b5" href="#mysql-isnull-character-varying-6a95e9b5">`mysql."isnull"(val character varying) → integer`</a> | Test whether the value is NULL. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L120-L137) |
| <a id="mysql-isnull-character-35583e0b" href="#mysql-isnull-character-35583e0b">`mysql."isnull"(val character) → integer`</a> | Test whether the value is NULL. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L101-L118) |
| <a id="mysql-isnull-pg-catalog-date-4357e42d" href="#mysql-isnull-pg-catalog-date-4357e42d">`mysql."isnull"(val date) → integer`</a> | Test whether the value is NULL. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L158-L175) |
| <a id="mysql-isnull-integer-83d5cfaa" href="#mysql-isnull-integer-83d5cfaa">`mysql."isnull"(val integer) → integer`</a> | Test whether the value is NULL. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L25-L42) |
| <a id="mysql-isnull-json-0115138a" href="#mysql-isnull-json-0115138a">`mysql."isnull"(val json) → integer`</a> | Test whether the value is NULL. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L456-L471) |
| <a id="mysql-isnull-numeric-5c1fb542" href="#mysql-isnull-numeric-5c1fb542">`mysql."isnull"(val numeric) → integer`</a> | Test whether the value is NULL. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L82-L99) |
| <a id="mysql-isnull-pg-catalog-text-b1444d03" href="#mysql-isnull-pg-catalog-text-b1444d03">`mysql."isnull"(val text) → integer`</a> | Test whether the value is NULL. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L139-L156) |
| <a id="mysql-isnull-time-without-time-zone-e330d4a3" href="#mysql-isnull-time-without-time-zone-e330d4a3">`mysql."isnull"(val time without time zone) → integer`</a> | Test whether the value is NULL. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L177-L194) |
| <a id="mysql-isnull-timestamp-without-time-zone-8b4c774d" href="#mysql-isnull-timestamp-without-time-zone-8b4c774d">`mysql."isnull"(val timestamp without time zone) → integer`</a> | Test whether the value is NULL. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/41-func-flow.sql#L196-L213) |

---

Backlinks:

- [Functions](/docs/mysql/reference/objects/functions/)
