So you want to learn SQL?

Image

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:

  1. http://sqlzoo.net/ (and interactive SQL Tutorial)
  2. http://webcheatsheet.com/SQL/interactive_sql_tutorial/sql_select.php (A web cheet sheet good for the environment)
  3. 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:

  • SELECT
  • INSERT
  • DELETE
  • CREATE

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.

Example:

  1. SELECT * FROM <Table Name> WHERE <Field Name> = <Value = from Table Name & Field Selected>
  2. 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.

Happy Learning!

© 2013 TestingFocus

Advertisements

One thought on “So you want to learn SQL?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s