*= operator Does not work in SQL 2012 and beyond

The *= operator has been depreciated in new SQL Servers starting from 2012.

The alternate you can use is the left join instead of *= .For Example

 Old Code :

SELECT * FROM table1 a , table2 b

Where a.ID *= b.ID

 Alternate New Code:

SELECT * FROM table1 a left join table2 b

on a.ID = b.MinID

 

 

The same is the case with =* operator in which right join is the alternate.

Thanks

Leave a comment