SQL Delete TOP
SQL delete statement is used to delete records from table based on specific conditions which are specified in where clause. Delete statement can also be… Read More »SQL Delete TOP
SQL delete statement is used to delete records from table based on specific conditions which are specified in where clause. Delete statement can also be… Read More »SQL Delete TOP
When you are required to import data received from different different file format such as .txt, .csv., or excel files, sometimes you see a white… Read More »Delete Horizontal White Space in SQL Serve
Sometimes you need to format a date in specific format such as format a date time string YYYY-MM-DD hh:mm:ss. mmm to date MM:DD:YY. SQL Server… Read More »Date and Time Conversions in SQL Server
Sometime you are required to validate the row counts for each tables in database. So getting a row counts for each tables either through using… Read More »Get Row Counts for all tables in SQL Server
Object_ID is a SQL Server Metadata function which returns the database object identification number of a schema-scoped object. It can not be used for object… Read More »Object_Id Metadata Function
Dynamic data masking also known as DDM is a security feature in SQL Server which helps you to prevent the access of unauthorize users to… Read More »Dynamic Data Masking in SQL Server
Collations in SQL Server provide sorting rules, case, and accent sensitivity properties for your data. You can easily find SQL collation at the server, database… Read More »View Collation Information in SQL Server
PARSENAME function is a SQL Server Metadata function which returns the specified part of an object name. The parts of an object that can be… Read More »PARSENAME Function
SQL SELECT TOP statement is used to retrieve records from tables and limit the number of rows or percentage of rows returned based on a… Read More »SQL SELECT TOP
If any number that is written like as 1st, 2nd, 3rd and so on.. is called an ordinal number, and it is read as 1st(… Read More »How to get Ordinal Number in SQL
There are various in-built system catalog views, or metadata functions that you can use to check the existence of column in SQL Server tables. To… Read More »Check if column Exists or not in SQL Server Table
Lets see how to print a Xmas or Christmas Tree in SQL Server. The best way of implementing a Xmas tree pattern you can use a… Read More »Print Christmas tree in SQL Server
SQL code snippet is a template which contains the basic structure of a Transact-SQL statement or block, so that you can quickly write queries without… Read More »SQL Code Snippets
SQL Server 2016 has released an optional IF EXISTS clause with DROP statement that can be used as DROP IF EXISTS. DROP IF EXITS verify… Read More »DROP IF EXISTS
You might have faced an error as shown below, when you make some changes in table from design mode in SQL server management studio (SSMS).… Read More »SQL Server Saving Changes is not permitted error
You can script a table from database using a SQL Server Management Studio. SQL Server Management allows you to script out tables from database using… Read More »Script table in SQL Server
You can generate a database scripts including the schema and the data by using the Generate Scripts option available in SQL Server Management Studio (SSMS),… Read More »Generate Database Scripts With Data in SQL Server
Table Value Constructor (TVC) allows to group multiple rows of data in a single DML statement. It can be used as a part of either… Read More »Table Value Constructor
SQL Server 2012 has released a new feature WITH RESULT SETS, which allows column names and their data types to be changed in the result set… Read More »Change the column name and data type of result set of stored procedure
Selecting a top n records for each category from any table, can be done easily using row_number function which generates a sequential integer to each… Read More »How to get TOP N records for each category