Follow Us
Categories
- Azure (8)
- DBA (17)
- Festive Greetings (1)
- Interview Questions (29)
- Miscellaneous (10)
- SQL Server (99)
- Imp SQL Difference (6)
- Most Imp SQL Concepts (13)
- SQL ACID Rule (1)
- SQL Advanced (17)
- SQL Basic (10)
- SQL Basic Concepts (17)
- SQL Best Practices (2)
- SQL CTE (2)
- SQL Cursor (1)
- SQL Data Types (1)
- SQL Database Backup (1)
- SQL Database Mirroring (1)
- SQL Database Restoration (3)
- SQL DDL, DML, DCL, TCL (1)
- SQL Derived Table (1)
- SQL Functions (17)
- SQL Group By Having (1)
- SQL Indexes (7)
- SQL Isolation Level (1)
- SQL Joins (1)
- SQL Log Shipping (1)
- SQL Merge Command (1)
- SQL Normalization (5)
- SQL Output Clause (1)
- SQL Pivot and Unpivot table (1)
- SQL Primary Key Constraint (2)
- SQL Queries Sub-queries (1)
- SQL Ranking Function (1)
- SQL Replication (1)
- SQL Server Exception handling (1)
- SQL Stored Procedure (4)
- SQL Temporary Tables (3)
- SQL Triggers (3)
- SQL Union Function (1)
- SQL View (1)
- SQL While loop (1)
- SQL Tips (5)
-
Recent Posts
- SQL Joins Tricky Interview Questions April 17, 2019
- Point In Time Restore for Azure SQL Database January 8, 2019
- Azure – Creating an Azure SQL Database December 27, 2018
- Merry Christmas December 24, 2018
- SQL Triggers – An Introduction December 8, 2018
- Migrating SQL Database To Azure SQL Instance using Microsoft Database Migration Assistant (DMA) Tool November 25, 2018
- How to migrate SQL Database to Azure SQL Database using SSMS Export/Import November 19, 2018
Archives
- April 2019 (1)
- January 2019 (1)
- December 2018 (3)
- November 2018 (6)
- October 2018 (1)
- April 2018 (1)
- March 2018 (4)
- August 2017 (1)
- July 2017 (1)
- September 2016 (1)
- December 2015 (1)
- August 2015 (3)
- July 2015 (3)
- February 2015 (1)
- January 2015 (16)
- November 2014 (1)
- October 2014 (2)
- August 2014 (22)
- April 2014 (2)
- March 2014 (1)
- January 2014 (8)
- December 2013 (6)
- November 2013 (2)
- December 2012 (5)
- November 2012 (1)
- August 2012 (2)
- April 2012 (4)
- January 2012 (7)
- August 2011 (1)
- July 2011 (1)
- May 2011 (2)
- September 2010 (2)
- January 2010 (14)
- December 2009 (3)
- November 2009 (2)
- October 2009 (3)
- September 2009 (1)
- August 2009 (1)
Category Archives: SQL Basic
Script to find complete months between two given dates
Complete months between two given dates Below script will help in finding the complete months within the 2 given dates. In the below script we takes below dates as exampleStartdate =2015-07-05 Enddate =2016-01-06 /**********************Script Start**************************/ IF (object_id(‘tempdb..#month’) is not null) … Continue reading
Posted in Interview Questions, SQL Basic, SQL Server
Tagged DBA Scripts, SQL Date time functions, Sql Server
Leave a comment
Script to find the complete weeks within two given dates
Complete weeks within two given dates Sometimes we need to find out the complete weeks within two given dates. Below script will help in finding the complete weeks within 2 given dates. In this script, I have used below dates … Continue reading
Posted in Interview Questions, SQL Basic, SQL Server, SQL Tips
Tagged DBA Scripts, Sql Server
21 Comments
RIGHT() function in SQL Server
SQL Server – RIGHT () function Right():- This function returns the specified number of characters from the Right part of the given character string. Syntax:- Select RIGHT ( character_expression , integer_expression ) For example, the below query will return two characters … Continue reading
LEFT() function in SQL Server
LEFT() function in SQL Server Left() Function This function returns the specified number of characters from the left part of the given character string. Syntax Select LEFT ( character_expression , integer_expression )For example, the below query will return two characters … Continue reading
Between function in SQL Server
Between function in SQL Server This function is used to select the values within a specified range. These values can be of Int type or Date data type or Text data type. Syntax:- SELECT column_name(s) FROM table_name WHERE column_name BETWEEN … Continue reading
SQL SERVER – Data types
Data types in SQL Server In relational database, we store data in tabular form where data is divided into columns. Each column has a name and a data type which shows what type of data is going to store in … Continue reading
SQL Server – Convert() function
Convert () function in SQL Server Convert () function is used to convert an expression from one data type to another data typeSyntax for CONVERT function CONVERT ( data_type [ ( length ) ] , expression [ , style ] ) Convert functions … Continue reading
Posted in SQL Basic, SQL Functions, SQL Server
Tagged SQL Basic Concepts, SQL Date time functions
31 Comments
Database Creation using SQL Sever Management Studio (SSMS)
In the previous article (Database Creation using Create Database command), I explained the database creation using the Create database command. In this article, I am going to explain the steps of creation a database using SQL Sever Management Studio (SSMS) … Continue reading
Database Creation using Create Database command
In SQL Server, database can be created by 2 ways:- Using Create Database command Using SQL Sever Management Studio (SSMS). In this article, I am going to explain the database creation using the command CREATE DATABASE. Syntax for creating a … Continue reading
Group by…..Having Clause
Group By:- Group By clauses is used to groups rows based on the distinct values of the specified columns. The syntax of the Group by clause is:- Select column1, column2, column3, aggregate_function(expression ) From … Continue reading