@wio
I am gonna ask you many questions sorry :D What does "Create view" command do?
(in general) basically
Create view In mysql?
yes
I dunno. I just read the docs, and it looks like it lets you create a table from a query which you can query against.
table from a query? o.O whats the use?
I have never needed to use it myself.
Can u tel smt about Joint and union??
What about it?
what they do..how they work..etc..anything :/ just the basic idea
Union just combines two select statements into a single result.
and joint?
I see join, but not joint.
sorry its joins only ^^
What does this line mean? The ORDER BY clause can occur only at the end of the UNION statement.It CANT be used within the individual queries that make the UNION statement. The GROUP BY and HAVING clauses are allowed only within individual queries.These clauses cannot be used to affect the final result set.
Suppose you have two queries, Q1 and Q2
You can't put an ORDER BY on Q1 or Q1 if you 're going to union them.
However, suppose we call the union Q3
Q3 can have an order by.
However Q3 can't have group by or having. Yet Q1 and Q2 can use group by and having
can u explain in a bit more detail? hard to visualize lol..
Some uses for views: http://stackoverflow.com/questions/1278521/why-do-you-create-a-view-in-a-database
answer other questions too!
@e.mccormick
These seem quite literal to me. "The ORDER BY clause can occur only at the end of the UNION statement. It CANT be used within the individual queries that make the UNION statement." "The GROUP BY and HAVING clauses are allowed only within individual queries. These clauses cannot be used to affect the final result set." They say when things can and can not be done. WHY they can and can not be done at those points has to do with the development of SQL. I do not know enough about that to explain the why. But the what is a set of rules similar to order of operations in math. Thing have to happen in the proper order or they will not work.
Join our real-time social learning platform and learn together with your friends!