Selecting Only EVEN or ODD Records from Tables – MS SQL SERVER

Introduction In this article, we will learn to Select only EVEN or ODD records from the MS SQL Server database table🤔. The efficient way to find the record belongs to even or odd is determining by the table's ID column. Select EVEN Records By applying the modulo operator by 2 for the ID column, we... Continue Reading →

Stored Procedure Performance Tuning

Introduction In the Database, we may be using Stored Procedures. Most of the time we are concerned about the performance of the Stored Procedures. In this article, I would like to share a few techniques to improve the stored procedure's performance to get better results in less time. Optimization Techniques SET NOCOUNT ON/OFF - When... Continue Reading →

Optimize your SQL Query – Replace Star (*) in Select Statement – MS SQL Server

Introduction Sometime we may need almost all the columns from a table result. In this scenario we use Star(*) in our select statement i.e. as SELECT * FROM TableName. Using Star(*) in the select statement is BAD. The best approach is selecting the table with column names. In this article we will learn how quickly... Continue Reading →

How to Store non-English Characters in SQL Server

Introduction Sometime, we may need to store non-English characters or multiple languages in our database. In this article, we will have a look at how to store non-English characters in SQL Server. VARCHAR vs NVARCHAR We can store non-English Characters in our database table using the data type NVARCHAR(). The N stands for Unicode. It... Continue Reading →

Backup Database using T-SQL Statements

Introduction In this article, We will discuss how to backup our database in MS-SQL Server using T-SQL Statements. We need to use BACKUP DATABASE statement to create full database backup, along with the name of Database and device to store the backup file. Syntax BACKUP DATABASE database_name TO device_name Example BACKUP DATABASE PracticalWorks TO DISK... Continue Reading →

Pinned tabs in SQL Server Management Studio (SSMS)

Introduction While working in SQL Server Management Studio (SSMS), we may need to open many query windows. But each time we may feel difficult to recognize the important query window which we need to refer frequently. There is an option, we can Pin the tabs which are mostly frequently referred. Pinning Tabs We can pin... Continue Reading →

Split Query Window in SQL Server Management Studio(SSMS)

Introduction Sometime we may write a long query in our query window and we may need to refer the objects or other part of the T-SQL frequently. For that we may be scrolling up and down in the query window. But we have an awesome option for that in the SQL Query Window, which many... Continue Reading →

Last Execution of Stored Procedure in SQL Server

Introduction In an ERP project or any other big applications, there may be many Stored Procedures used. But we are not sure that all the stored procedures are required or not or valid ones. While the requirement(s) has changed, we may ended with another new stored procedure or based on the performance we may have... Continue Reading →

List Databases Available for Current User -SQL Server

Introduction Sometimes, we may be curious to know to which databases do we have access or we need to access a particular database but not sure that we have access or not. In this article, we will discuss a T-SQL that will list the Databases available for current user. For Particular Database HAS_DBACCESS  - This... Continue Reading →

Format JSON Output in SQL Server

Introduction From SQL Server 2016 JSON functions are introduced, since many modern Web and Mobile applications are using JSON data format for exchanging data. Many REST web service results are in format of JSON text or accept the data that is formatted as JSON. In this article, we will have a look How to Create... Continue Reading →

Find user who ran DROP statements – SQL Server

Introduction Sometimes we need to track or find which user has DROPPED the table(s) from the Database. In this article, we will discuss the possible ways to track this situation. I have a table already in my Database, SELECT [StudentId], [FirstName], [LastName] FROM [StudentManagementSystem].[Students].[StudentDetails] Fig 1. Results Drop table Now I am going to apply... Continue Reading →

SQL Server Management Studio Shortcut Keys Cheat sheet

Introduction In this article, I would like to share few shortcut keys which is really useful fIn this article, I would like to share a few shortcut keys which are really useful for day to day usage in SQL Server Management Studio, which will improve your productivity. Main Menu Bar Main Menus in SSMS To... Continue Reading →

MS SQL Server – Zero to Hero Query Master – Part 2

Introduction In this article, you will learn how to create a database, access the created database, and delete the database in SQL Server. This is the continuation of part one of the series of "Zero To Hero in MS SQL Server."  As I stated in my previous article, this article series is mainly for beginners who... Continue Reading →

MS SQL Server – Zero to Hero Query Master – Part 1

Introduction This is part one of the Zero To Hero Series in MS SQL Server. This is mainly focused on beginners who are into MS SQL Server and also for experienced developers who want to freshen up their knowledge for interviews and daily technical work. The examples in this article series will be connecting us... Continue Reading →

SQL Developer – Roles & Responsibilities

Introduction In this article, I would like to share some of the key roles and responsibilities of a SQL Developer. This will be useful for those who wish to be a master of the database (MS SQL Server). The following is the flow of this write-up. BackgroundWhat is SQLWho is SQL DeveloperRole and Responsibility of an... Continue Reading →

WordPress.com.

Up ↑

%d bloggers like this: