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

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -