When I started in testing had some basic skills and knowledge of SQL but not enough to pull some of the more complex statements together in order to effectively interrogate databases.
But like with any muscle of the human body the brain is a muscle and needs to be exercised!. So I set off to practice my SQL.
So when I wanted to get better at interrogating SQL databases, Primarily to validate test data to ensure that the function for the SQL query was interrogating the database correctly.
I set off to learn how to interrogate the database, But I asked myself “How do I do this?”. I stopped then asked a colleague, “How would you go about starting to learn SQL properly and effectively?.
My colleague at the time suggested the below sites in the following order:
- http://sqlzoo.net/ (and interactive SQL Tutorial)
- http://webcheatsheet.com/SQL/interactive_sql_tutorial/sql_select.php (A web cheet sheet good for the environment)
- http://infolab.stanford.edu/~ullman/fcdb/oracle/or-plsql.html (To better understand the Procedural Language base of SQL)
He went on to say that I should start off by learning the basic statements then expand on that base knowledge of statements by adding variants into the mix.
Suggested statements to start with:
Once mastering those basic commands you can do a fair amount of operation on any database. Then to expand further on the procedural language you will need to execute what are known as the conditional operators.
- SELECT * FROM <Table Name> WHERE <Field Name> = <Value = from Table Name & Field Selected>
- DELETE FROM <Table Name> WHERE <value> = ‘Foo’
Note: Be careful with the drop command <DELETE> It has the potential to remove anything its pointed at!
Basically from following this methodic approach to learning SQL I found it easier to revise when you haven’t used it for a while and practicing to hone my skills.
© 2013 TestingFocus