SQL can be an unforgiving language. Find out how to avoid common pitfalls.
When working with SQL there are…a few common mistakes that it's easy to make.…SQL is not a very forgiving language…if you don't have the syntax just right.…And the errors that you'll get back, can be cryptic at best.…So, if you're getting an error message,…be sure to read it…and see if it points you in the right direction.…If you have a syntax error that you just can't find,…start breaking down the statement into pieces that do work.…And then put the statement together again,…keeping an eye on when an error happens.…It's easy to miss a set of parentheses…or misspell a field name and when you're learning,…it can be tricky to remember the order of clauses…or whether a keyword is missing an important part.…
Keep in mind that if you're using a text string,…you need to put it in single quotes…for it to be treated as text.…And if for some reason your database has spaces…in field names, which is allowed,…but isn't really best practice,…you'll need to use backticks around the name of the field…when you use it in a statement.…
- What is SQL?
- Asking for data with SELECT
- Limiting database responses
- Organizing responses
- Asking for data from two or more tables
- Understanding join types and data types
- Transforming data
- Performing math
- Adding and modifying data in a table