Skip navigation links

MySQL Forums :: Stored Procedures :: ISNULL function


Advanced Search

ISNULL function
Posted by: ram krishna ()
Date: February 28, 2008 10:38PM

In a program, I work with SQLServer and MySql. In a particular select,
for SQLServer, I have something like this:

SELECT ISNULL(field,0) FROM TABLE.

If the field is not null, returns its value; otherwise, 0.

I have found isnull for MySQL, but it does not work exactly the same
way.

Any idea to convert that isnull from SQLServer to MySQL?

This is how i use in MSSql:-

fieldname = "ISNULL(Max(iClientID),0)+1"
ClientID = Convert.ToInt32(obj.ReturnSingleValue("UserClient", fieldname))

So in mysql ,what is its equivalent?



Edited 2 time(s). Last edit at 02/29/2008 01:01AM by ram krishna.

Options: ReplyQuote


Subject Views Written By Posted
ISNULL function 288089 ram krishna 02/28/2008 10:38PM
Re: ISNULL function 82215 William Chiquito 02/29/2008 10:15AM
Re: ISNULL function 30043 Joe Aponte 03/23/2008 12:22PM
Re: ISNULL function 16624 William Chiquito 03/23/2008 01:02PM
Re: ISNULL function 11478 Joe Aponte 03/24/2008 08:10AM
Re: ISNULL function 15976 William Chiquito 03/24/2008 06:05PM
Re: ISNULL function 12215 Joe Aponte 03/25/2008 12:29PM
Re: ISNULL function 14978 Steve Brinton 03/30/2009 06:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.