Sql Fundas

Posted: February 25, 2014 in Database
Tags: , , ,

sometimes we spend very hard time by using some weird inner joins, group by clauses and nested queries for retrieving set of data from our database.

Thumb rule : when finding the rows that you want is moving very hard , then try eliminating rows that you don’t want to be there.

one simple delete statement can do an awesome job that a group by and complex sub queries does.

so , always keep in mind that they are two approaches for getting the data.

1. finding what you want
2. eliminating what you don’t want


Comments are closed.