Hi,

If I understand your question correctly It can be done in exactly the same way 
as when you run the SQL. 
In the view you specify a SELECT statement in which you can use case/ISNULL etc.

CREATE VIEW view_name AS
SELECT table_right.column1
        IFNULL(table_left.column2, 0), 
        Table_right.column3,
         etc...
FROM table_name1 As table_right
Left outer join table_name2 As table_left
ON table_right.column1 = table_left.column1
WHERE condition;

BR, Sakke Ferraris

-----Ursprungligt meddelande-----
Från: Trà Đá Một Mình [mailto:[email protected]] 
Skickat: den 26 juli 2017 08:51
Till: [email protected]
Ämne: How to set default value for LEFT JOIN

Hi Everyone,

In SQL, we can using case-when, ISNULL or another way to set default value for 
a column if returned NULL. So how we can do this with view-entity ?

Thanks!

--
*THANG NGUYEN (Mr)*

*OLBIUS DEVELOPER**Email:* [email protected]| *Mobile:* (+84)
1674636641

*OLBIUS., JSC*
*Tel:* (+84) 9 88 99 3333
*Address: *25th Fl., No 91, Nguyen Chi Thanh St., Ha Noi City, VietNam
*Website:* http://olbius.com

Reply via email to