Alternatives · Basic Logics · Real Scenario Logic's

Listing Comma Separated Columns instead of ‘*’ in SQL Server

Introduction In any scenarios, if we need to explicitly list out all the column names of a table instead of using '*', we can use like below Script- Sample SQL Script IF(OBJECT_ID('TestEmp') IS NOT NULL) DROP TABLE [TestEmp]; CREATE TABLE dbo.[TestEmp] ( TestEmp_Key INT IDENTITY(1,1) NOT NULL, EmpName VARCHAR(100) NOT NULL, Age INT NULL, [Address] VARCHAR(100)… Continue reading Listing Comma Separated Columns instead of ‘*’ in SQL Server

Advertisement
Basic Logics · Real Scenario Logic's · String Manipulation

Counting Number of Occurrences of a Particular Word inside the String Using T-SQL

Introduction In this blog post, we will see how can we easily find the number of occurrences of a Particular Word inside the String Using T-SQL. Check our previous post for Finding Number of Occurrences of a Particular Character in the String. Finding Number of Occurrences of a Particular Word inside the String LOGIC The… Continue reading Counting Number of Occurrences of a Particular Word inside the String Using T-SQL

Basic Logics · Real Scenario Logic's · String Manipulation

Finding Number of Occurrences of a Particular Character in the String Using T-SQL

Introduction In this blog post, we are going to see how can we easily find the number of occurrences of a Particular Character in the String Using T-SQL. Finding Number of Occurrences of a Particular Character in the String LOGIC The Difference between the Length of String and Length of String without considering given particular… Continue reading Finding Number of Occurrences of a Particular Character in the String Using T-SQL

Alternatives · Basic Logics · Keyboard Shortcuts · Real Scenario Logic's

Check Database Size in SQL Server for both Azure and On-Premises

Introduction In this blog post, we will see how to check the database size in SQL Server irrespective of Azure and On-Premises using common T-SQL. Here, we will see two easy methods that is Common for both On-Premises and Azure SQL DB. To Check Current Database Size Method 1 - Using 'sys.database_files' System View We… Continue reading Check Database Size in SQL Server for both Azure and On-Premises

Alternatives · Basic Logics · Real Scenario Logic's

Common Alternatives to IF ELSE Logic in SQL Server with Simple Example in SQL Server-[PART 2]

Introduction- This is a Part 2 of one of my previous post named -'Common Alternatives to IF ELSE Logic in SQL Server with Simple Example'. In Part 1, we have already seen what are the common alternatives of IF ELSE logic in SQL Server and what are the Definition,Syntax and Demo SQL Scripts for IF ELSE,CASE… Continue reading Common Alternatives to IF ELSE Logic in SQL Server with Simple Example in SQL Server-[PART 2]

Basic Logics · Real Scenario Logic's

Show and Hide Line Numbers in SQL Server Management Studio (SSMS)

Introduction Many of us would face some challenges as a developer while debugging the SQL Codes. SQL Server would show us some error message with the particular Line Number where the error has occurred. The main aim of this post is to see, how to Show/Hide Line Numbers in SSMS. Show/Hide Line Numbers in SSMS… Continue reading Show and Hide Line Numbers in SQL Server Management Studio (SSMS)

Basic Logics · Date Functions · Real Scenario Logic's

To Find Current Indian Financial Year Start and End Date easily in both Azure SQL and On-Premises

Introduction The main objective of this post is let the users to know, how we can find Indian Financial Year Start and End Date easily in both Azure SQL and On-Premises with the common simple script. The below suggested script would work for both Azure SQL and On-Premises. Financial Year A Financial Year is actually… Continue reading To Find Current Indian Financial Year Start and End Date easily in both Azure SQL and On-Premises

Basic Logics · Real Scenario Logic's

To View List of ASCII Characters in SQL Server

Introduction The goal of this blog post is to know, how we can view the list of ASCII (American Standard Code for Information Interchange ) Characters in SQL Server. To View ASCII Character's List SQL Script SELECT NO,CHAR(NO) AS Characters FROM ( SELECT TOP 256 ROW_NUMBER() OVER (ORDER BY (SELECT NULL))-1 AS NO FROM SYS.COLUMNS… Continue reading To View List of ASCII Characters in SQL Server