when or why using mysql AS and USING? -


can explain me why use as id , as r2 , using id on codes :

select id, username friendship join (select ceil(rand() * (select max(id) friendship)) id) r2 using (id); 

i want know purpose of using them, why using them?

the create alias subquery, way can use same alias 'id' using command.

basically query wants friendship table join subquery on id column, since subquery returns 1 result can join id column in friendship table.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -