sql - COALESCE in MySQL returning conversion failed -


i trying execute coalesce nvl in oracle.

select coalesce('system admin',10) 

ideally should return "system admin" output.

select coalesce(null,10) 

and should return 10.

but syntax returning....

select coalesce('system admin',10) 

conversion failed when converting varchar value 'system admin' data type int.

plz what's wrong here

you should return string alternative, (must have same data type)

select coalesce('system admin', '10') .... 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -