I have a table employee(id,empname,salary,dob) If the record of id and empname is null..whole record should be removed in different table...
For example.....
id | empname |salary | year
_____________________________
101 | ishi |100000 | null
null | aarush |200000 | 4
102 | rkr |2000000| 6
104 |null |300000 | 3
105 |null |400000 | 3
If Id column has null value..the record should be fetch and placed in different table say null_table ...same case for empname column the rest record should be placed in different table say success_table
The output should be
success_table:
id | empname |salary | year
_____________________________
101 | ishi |100000 | null
102 | rkr |2000000| 6
null_table:
id | empname |salary | year
_____________________________
null | aarush |200000 | 4
104 |null |300000 | 3
105 |null |400000 | 3
I am new to postgres...Any suggestions are appreciated...