Please enable Javascript to correctly display the contents on Dot Net Tricks!

SQL Server Tutorial - For Beginners & Professionals

sql server 2012 tutorial,sql server 2005 2008 2012 tutorial for beginners, sql server recipes,sql server tips, sql server tricks, sql server tips & tricks, sql server internal
 
Author : Shailendra Chauhan
updated on 24 Sep 2016

Stored Procedures are pre-compile objects which are compiled for first time and it's compiled format is saved which executes (compiled code) whenever it is called. But Function is compiled and executed every time when it is called.

 

 

Author : Shailendra Chauhan
updated on 24 Sep 2016

One student of me asked "how can we get nth highest and lowest salary on an employee ?". In this article I am going to expose, how can we achieve this in SQL Server.

 

 

Author : Shailendra Chauhan
updated on 24 Sep 2016

One student of me asked "how can we get fields name of a table with theirs type and size ?". In this article I am going to expose, how can we achieve this in SQL Server.

 

 

Author : Shailendra Chauhan
updated on 24 Sep 2016

Sometimes we required to remove duplicate records from a table although table has a UniqueID Column with identity. In this article, I would like to share a best way to delete duplicate records from a table in SQL Server.

 

 

Author : Shailendra Chauhan
updated on 28 Mar 2014

Best performance is the main concern to develop a successful application. Like a coin database is the tail side (back-end) of an application. A good database design provides best performance during data manipulation which results into the best performance of an application.

 

 

Author : Shailendra Chauhan
updated on 25 Sep 2012

Suppose, you are sending mail to different-different users by using while loop and you forgot to insert while loop update statement. In this case SQL Server will generate thousands or millions of mail against a specific email address with in a min.

 

 

Author : Shailendra Chauhan
updated on 24 Sep 2016

Sometimes we required to generate a comma separated list of columns values like a list of EmailIDs to send mail. In SQL Server, we can make a comma separated list by using COALESCE as shown in below.

 

 

Author : Shailendra Chauhan
updated on 24 Sep 2016

Normalization or data normalization is a process to organize the data into tabular format (database tables). A good database design includes the normalization, without normalization a database system may slow, inefficient and might not produce the expected result. Normalization reduces the data redundancy and inconsistent data dependency.

 

 

Author : Shailendra Chauhan
updated on 24 Sep 2016

As we know, the cursors are required when we need to update records in a database table in singleton fashion means row by row. A Cursor also impacts the performance of the SQL Server since it uses the SQL Server instance’s memory, reduce concurrency, decrease network bandwidth and lock resources.

 

 

Author : Shailendra Chauhan
updated on 24 Sep 2016

Sometimes we have multiple triggers on the same event(s). In that case we can't predict the firing order of triggers. Sometimes the firing order of trigger(s) is important for us to implement business logic. To solve this issue, In SQL Server we have option to set the firing order of triggers on same event(s).

 

 

Author : Shailendra Chauhan
updated on 24 Sep 2016

A Cursor allow us to retrieve data from a result set in singleton fashion means row by row. Cursor are required when we need to update records in a database table one row at a time.

 

 

Author : Shailendra Chauhan
updated on 27 Oct 2016

A Cursor is a database object to retrieve data from a result set one row at a time, instead of the T-SQL commands that operate on all the rows in the result set at one time. We use cursor when we need to update records in a database table in singleton fashion means row by row.

 

 

Author : Shailendra Chauhan
updated on 24 Sep 2016

Recently, I have configured database mail in SQL Server 2008. Here, I am sharing what I have learnt and how did I configure this powerful feature of sending mail in SQL server 2008.

 

 

Author : Shailendra Chauhan
updated on 24 Sep 2016

A transaction is a set of T-SQL statements that are executed together as a unit like as a single T-SQL statement. If all of these T-SQL statements executed successfully, then a transaction is committed and the changes made by T-SQL statements permanently saved to database. If any of these T-SQL statements within a transaction fail, then the complete transaction is cancelled/ rolled back.

 

 

Author : Shailendra Chauhan
updated on 24 Sep 2016

Like C#, SQL Server also has an exception model to handle exceptions and errors that occurs in T-SQL statements. To handle exception in Sql Server we have TRY..CATCH blocks. We put T-SQL statements in TRY block and to handle exception we write code in CATCH block. If there is an error in code within TRY block then the control will automatically jump to the corresponding CATCH blocks.

 

 

 
3 APR
Master Class Fast Track MVC 5 with Angular2 Development (Online)

10:30 AM -03:30 PM IST (Fast Track)

Know More
25 MAR
MEAN Stack 2 Development (Classroom)

11:00 AM-12:30 PM

25 MAR
ASP.NET MVC with Angular2 Development (Classroom)

3:00 PM-4:30 PM

25 MAR
Xamarin Forms : Build Cross-platform Apps (Classroom)

8:00 AM-9:30AM

21 MAR
ASP.NET MVC with Angular2 Development (Online)

09:00 PM - 11:00 PM IST( TUS, THR, SAT)

6 MAR
ASP.NET MVC with Angular2 Development (Online)

07:00 AM - 09:00 AM IST( MON, WED, FRI)

25 FEB
ASP.NET MVC with Angular2 Development (Classroom)

05:00 PM-06:30 PM

31 JAN
ASP.NET MVC with Angular2 Development (Online)

07:00 AM-09:00 AM IST(Tuesday & Thursday)

30 JAN
NODEJS & MEAN Stack 2.x Development (Online)

09:00 PM-11:00 PM IST( MON, WED, FRI)

31 DEC
ASP.NET MVC with AngularJS Development (Classroom)

09:30 AM-11:00 AM

BROWSE BY CATEGORY
 
 
LIKE US ON FACEBOOK
 

Professional Speaks

+