Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do the *= and =* operators do in T-SQL? [duplicate]

Possible Duplicate:
SQL: What does =* mean?

I am going through some legacy code and found a query like this:

SELECT * from foo_table, bar_Table where foo_table.id *= bar_table.fac_id

What does the *= operator do?

like image 465
scottm Avatar asked Jan 13 '10 19:01

scottm


2 Answers

That is the old and no longer recommended way of specifying table joins.

The modern equivalent to what you're seeing would be:

SELECT * 
FROM foo_table
LEFT JOIN bar_Table ON foo_table.id = bar_table.fac_id
like image 113
Paul Sasik Avatar answered Sep 21 '22 23:09

Paul Sasik


I believe that is an old style way of referring to left and right inner and outer joins. Here is an article about it, and it being deprecated:

http://blogs.technet.com/wardpond/archive/2008/09/13/deprecation-of-old-style-join-syntax-only-a-partial-thing.aspx#3123714

like image 21
Randy Minder Avatar answered Sep 17 '22 23:09

Randy Minder