sql

Sometimes we do very ugly thing just because of missing simple tricks.
 
I believe all of the devs who work with sql use SELECT TOP command as they need. This is a very simple sql command.
 

SELECT TOP 10 * FROM YOURTABLE

 
Now, sometimes you need to use variable instead of constant number (say 10). If you write the query as
 

Unit test is the process by which we can make sure our code is working as our expectation. Actually most of the time we write unit test against frond-end code(ui level, business, dataaccess) and we are not very familiour that in respect of database level.

In many scenarios we write triggers on database tables. Before writing a trigger we need to understand what trigger is and how exactly it works. Because, lack of clear knowledge on triggers can ake your life difficult. Trigger is actually a procedure that runs in response of an event fired due to performing some operations on database tables. The events could be insert, update or delete. Now, the question is how database handles the execution of a trigger when it fires?

Subscribe to RSS - sql