MySQL Forums
Forum List  »  Stored Procedures

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
309877
February 28, 2008 10:38PM
86469
February 29, 2008 10:15AM
31704
March 23, 2008 12:22PM
17465
March 23, 2008 01:02PM
12261
March 24, 2008 08:10AM
16802
March 24, 2008 06:05PM
12994
March 25, 2008 12:29PM
16084
March 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.