Hướng dẫn isnull mysql
Trong bài này mình sẽ hướng dẫn cách sử dụng hàm Bài viết này được đăng tại freetuts.net, không được copy dưới mọi hình thức. 1. Mô tảHàm 2. Cú phápCú pháp của hàm Trong đó: Bài viết này được đăng tại [free tuts .net]
Lưu ý:
3. VersionHàm
4. Ví dụmysql> SELECT ISNULL('freetuts.net'); Ket qua: 0 mysql> SELECT ISNULL(''); Ket qua: 0 mysql> SELECT ISNULL(NULL); Ket qua: 1 mysql> SELECT ISNULL(15); Ket qua: 0 ❮ Previous ❮ MySQL Functions Next ❯ ExampleTest whether an expression is NULL: SELECT ISNULL(NULL); Try it Yourself » Definition and UsageThe ISNULL() function returns 1 or 0 depending on whether an expression is NULL. If expression is NULL, this function returns 1. Otherwise, it returns 0. SyntaxISNULL(expression) Parameter Values
Technical Details
More ExamplesExampleTest whether an expression is NULL: SELECT ISNULL(""); Try it Yourself » ExampleTest whether an expression is NULL: SELECT ISNULL(350); Try it Yourself » ExampleTest whether an expression is NULL: SELECT ISNULL("Hello world!"); Try it Yourself » ❮ Previous ❮ MySQL Functions Next ❯ B.3.4.3 Problems with NULL Values The concept of the
Both statements insert a value into the To help with In SQL, the
To search for column values that are
To look for
See Section 3.3.4.6, “Working with NULL Values”, for additional information and examples. You can add an index on a column that can have When reading data with When using When using Aggregate (group) functions such as
For some data types, MySQL handles |