« first day (2500 days earlier)      last day (1818 days later) » 

 
5 hours later…
1:37 PM
hey all, is the following code:
SELECT id1, id2
FROM t1, t2
equivalent to
SELECT id1, id2
FROM t1 JOIN t2
? On MySQL? Also, does this equivalence hold for other flavors?
I tried to read the docs for "table references list" on here but I didn't understand it
 
If we look to what you write exactly, then the answer is both queries are wrong
The right one (I guess) is:
 
@Sami sorry, I needed to add ON 1=1 to the second query. Is it still wrong?
 
SELECT Column1, ...
FROM Table1 T1 JOIN Table2 T2
ON T1.ID = T2.ID;
 
@Sami please check this out sqlfiddle.com/#!9/292594/1/0 the query seems to be executing and producing a result. I just wanted a cartesian product of the rows of both tables, sorry if it was unclear earlier
i'm asking if FROM T1, T2 is equivalent to FROM T1 JOIN T2 ON 1=1 in all cases?
 
Ok, what's the results of both of the queries? I think you can run them and see if they return the same results no?
 
1:45 PM
they return the same result in this case, but I can't conclude from this that they will always return the same result :/
 
They will
 
thanks...where could i find documentation for the same? i wanted to read more about it
 

« first day (2500 days earlier)      last day (1818 days later) »