What is the difference b/w IS NULL functions in MySQL and MS SQL.
(@VendorID IS NULL OR @VendorID = Contract.VendorID) this is the MS SQL statement.If I want this in MySql do I need to change the syntax.And one more thing is What is IF Null?
You can use IS NULL
in MySQL
.
IFNULL
is a function that will return another value if the field is NULL
. This is SQL Servers equivalent of ISNULL
For example:
IFNULL(VendorId, 0)
Will return 0 if the VendorId is null
You can also use COALESCE
which will return the first non NULL
value:
SELECT COALESCE(Field1, Field2, Field3)
FROM YourTable
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With