Appendix B: MySQL Functions - Build Your Own DatabaseDriven Website Using PHP amp;amp; MySQL [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Build Your Own DatabaseDriven Website Using PHP amp;amp; MySQL [Electronic resources] - نسخه متنی

Kevin Yank

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید








Appendix B: MySQL Functions

MySQL provides
a sizeable library of functions to format and combine data within SQL queries
in order to produce the desired results in the desired format. This appendix
provides a reference to the most useful of these functions, as implemented
in MySQL as of version 3.23.54a, current as of this writing.

For a complete, up-to-date reference to supported SQL functions, see
the MySQL Reference
Manual
.


Control Flow Functions



















IFNULL(expr1,expr2)


This function returns expr1 unless it is NULL,
in which case it returns expr2.


NULLIF(expr1,expr2)


This function returns expr1 unless it equals expr2,
in which case it returns NULL.


IF(expr1,expr2,expr3)


If expr1 is TRUE (that is, not NULL or 0),
returns expr2; otherwise, returns expr3.


CASE value

WHEN [compare-value1]
THEN result1

[WHEN ...] [ELSE else-result]
END


This function returns result1 when value=compare-value1 (note
that several compare-value/result pairs can be defined); otherwise, returns else-result,
or NULL if none is defined.


CASE WHEN [condition1]
THEN

result1 [WHEN ...] [ELSE

else-result]
END


This function returns result1 when condition is TRUE (note
that several condition/result pairs can be defined); otherwise, returns else-result,
or NULL if none is defined.


/ 190