Thursday, 25 June 2020

MySql Query Replace NULL with Empty String in Select

https://stackoverflow.com/questions/9560723/mysql-query-replace-null-with-empty-string-in-select

select if(prereq IS NULL ," ",prereq ) from test
select IFNULL(prereq,"") from test
select coalesce(prereq, '') from test

No comments:

Post a Comment

Note: only a member of this blog may post a comment.