#11
|
|||
|
|||
Re: Best way to learn SQL?
LEFT JOIN
MAX COUNT(*) SUM |
#12
|
|||
|
|||
Re: Best way to learn SQL?
Read over the mysql docs too. They're filled with examples, and might even have a tutorial.
|
#13
|
|||
|
|||
Re: Best way to learn SQL?
If you have access or can get the SQL server tools (you can get sql 2005 for free from here http://msdn.microsoft.com/vstudio/express/sql/download/
Ibelieve that includes the sql studio thing. They have a visual editor (Access has a similar one) where you can switch back and forth between editing the raw sql and visually building it with joins, etc). I've found this is a good way to get started in sql. When you add tables to the query it automatically puts in joins based ont he table keys which is usally what you want then you can click the joins and adjust properties pretty intiutively (like add ALL the rows from table X, etc) and watch the sql be written. "oh, you think, that's an LEFT OUTER JOIN, etc. I really dig this stuff, and still use it for complicated queries. |
#14
|
|||
|
|||
Re: Best way to learn SQL?
[ QUOTE ]
Read over the mysql docs too. They're filled with examples, and might even have a tutorial. [/ QUOTE ] I think that for learning SQL the MySQL docs are overly confusing. That W3schools link is pretty good. I think thebest way is to grab a copy of MySQL and mess around with it. |
#15
|
|||
|
|||
Re: Best way to learn SQL?
A classic :
"SELECT * FROM users WHERE clue > 0" 0 rows returned Seriously I agree that the W3School stuff is really good for a beginner, thats where I started. |
#16
|
|||
|
|||
Re: Best way to learn SQL?
Awesome, thanks!
|
#17
|
|||
|
|||
Re: Best way to learn SQL?
|
#18
|
|||
|
|||
Re: Best way to learn SQL?
[ QUOTE ]
http://www.w3schools.com/sql/default.asp That'll teach you most of what you need to know. Anything else can be googled. Don't waste your money on books. [/ QUOTE ] what he said |
#19
|
|||
|
|||
Re: Best way to learn SQL?
use "from" in basic sql queries that you are constructing without help of a gui tool. If you want to build queries using a gui tool it uses inner join anyways
|
#20
|
|||
|
|||
Re: Best way to learn SQL?
[ QUOTE ]
use "from" in basic sql queries that you are constructing without help of a gui tool. If you want to build queries using a gui tool it uses inner join anyways [/ QUOTE ] Are you saying to do joins by "FROM a, b WHERE a.x = b.x" instead of using a JOIN statement? If so, why would you do that (assuming you are using a version of SQL that supports joins)? |
|
|