how to create virtual table for inserting null value in mysql -


 employee id  name 1   mark 2   clark 3   johnson  4   peter   emp_salary  empid  sal  1     2000  2     4000  2     null  4     6000  5     null 

i need employee name salary null...and need show 5000 salary salary null, without inserting value in emp_salary table

i tried

select  e.name,e.empid,e.salary  table employee e inner join emp_salary em on e.id=em.empid   em.salary=null 

but query not working

i need select null value , show 5000 on null value without affecting table

select e.name,e.empid,'5000' salary  table employee e inner join emp_salary em on e.id=em.empid em.salary null 

check null "is null" not "=null"

this show employees salary null, select show "salary" 5000


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -