Your browser does not support JavaScript! Please enable script of your browser.
D
O
tNet-Tricks
Handy Dot Net Tricks Implementation !!
" Coding , A Rhythmic Literary Job "
SQL Server - Tutorial, Article, Archive, Pdf, Handy Tricks, Training, Code Snippets, Reference Manual, T-SQL, PL/SQL, Development, Administration, Performance Tuning, Backup, Recovery, Reporting, Analysis, Security, XML, CLR Objects
SQL Server Tutorial - Getting Started with SQL Server
Drop all tables, stored procedure, views and triggers
Posted By : Shailendra Chauhan, 27 Sep 2012
Updated On : 27 Sep 2012
Version Support : SQL Server 2005,08,12

Sometimes, there is a case, when we need to remove all tables, stored procedure, views and triggers completely from the database. If you have around 100 tables, stored procedure and views in your database, to remove these, completely from database became a tedious task. In this article, I would like to share the script

 

Difference between Primary Key and Unique Key
Posted By : Shailendra Chauhan, 26 Sep 2012
Updated On : 26 Sep 2012

In SQL Server, we have two keys - primary key and unique key which distinctively or uniquely identify a record in the database. Both the keys seems identical, but actually both are different in features and behaviours. In this article, I would like to share the key difference between primary key and unique key.

 

Difference between Primary Key and Foreign Key
Posted By : Shailendra Chauhan, 26 Sep 2012
Updated On : 26 Sep 2012

In SQL Server, there are two keys - primary key and foreign key which seems identical, but actually both are different in features and behaviours. In this article, I would like to share the key difference between primary key and foreign key.

 

Magic table or Virtual table in SQL Server
Posted By : Shailendra Chauhan, 25 Sep 2012
Updated On : 25 Sep 2012
Version Support : SQL Server 2005,2008,2012

Basically, magic table is the terminology used for virtual table in SQL Server since there is no magic in SQL Server. There are Inserted and Deleted virtual tables in SQL Server. These tables are automatically created and managed by SQL Server internally to hold recently inserted, deleted and updated values during DML operations (Insert,Update,Delete) on a database table.

 

Difference between Stored Procedure and Function in SQL Server
Posted By : Shailendra Chauhan, 15 Sep 2012
Updated On : 25 Sep 2012
Version Support : SQL Server 2005,2008,2012

tored 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.

 

Get field name, data type and size of database table
Posted By : Shailendra Chauhan, 31 Aug 2012
Updated On : 25 Sep 2012
Version Support : SQL Server 2005,2008,2012

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.

 

Get nth highest and lowest salary of an employee
Posted By : Shailendra Chauhan, 31 Aug 2012
Updated On : 25 Sep 2012
Version Support : SQL Server 2005,2008,2012

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.

 

Tips to improve SQL Server database design and performance
Posted By : Shailendra Chauhan, 27 Aug 2012
Updated On : 25 Sep 2012
Version Support : SQL Server 2005,2008,2012

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.

 

Remove unsent database email from SQL Server
Posted By : Shailendra Chauhan, 26 Aug 2012
Updated On : 25 Sep 2012
Version Support : SQL Server 2005,2008

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.

 

Remove duplicate records from a table in SQL Server
Posted By : Shailendra Chauhan, 24 Aug 2012
Updated On : 25 Sep 2012
Version Support : SQL Server 2005,2008,2012

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.

 

Tips & Tricks Subscription :