Introduction : In this article I am going to explain How to remove first and last character from string in sql server. We will also update...
Showing posts with label Sql tips and tricks. Show all posts
Showing posts with label Sql tips and tricks. Show all posts
SQL Server: How to Toggle / Flip / Invert value of Bit column
Introduction : In this article I am going to share some methods to invert / flip / toggle value of a bit field / column in sql server i.e....
SQL SERVER: Function to check column exists in table or not?
Introduction : In this article I am going to explain how to check whether column exists in table or not; if not only then add the column....
SQL SERVER: How to split or convert delimited string into rows without using function
Introduction : In this article I am going to explain How to convert or split the delimited string (comma separated string) into table row...
Sql server: How to sort alphanumeric string data in table
Introduction : In this article I am going to explain how to sort alphanumeric string data/records in sql table. In previous articles...
SQL SERVER: CTE recursive query to get parent child hierarchy with levels
Introduction : In this article I am going to explain how to create parent-child hierarchy( Continent-> Country-> State-> City ) w...
Sql Server: Case statement to Sort records by different columns of different data types
Introduction : Here in this article I am going to explain how to use CASE statement in Order by clause to sort records with different colu...
SQL Server: Count employees based on their months/days of experience | Get Experience wise employee summary.
Introduction : In this article I am going to share how to count employees based on their months or days of experience or we can say query ...
SQL Server: Count employees based on their years of experience | Get Experience wise employee summary.
Introduction : In this article I am going to share how to count employees based on their years of experience or we can say query to get ex...
Sql Server: Using case expression in order by clause to sort records
Introduction : Here in this article I am going to explain how to use CASE statement in Order by clause to sort records as per requirement....
SQL SERVER: How to add Unique Constraint/Index on a Column that allows Multiple Null values
Introduction : In this article example I am going to share how to add UNIQUE CONSTRAINT/ UNIQUE NONCLUSTERED INDEX on a column that allows...
SQL: ROW_NUMBER(), RANK(), DENSE_RANK(), NTILE() Ranking functions
Introduction : One of the most obvious and useful set of window functions available in SQL Server are ranking functions where rows from r...
How to get n random number of records from table in Sql Server
Introduction: In this article i am going to share how to select n number of rows randomly from sql server database table. In previou...
SQL SERVER: Generate Row Number/Serial Number without ordering by any columns
Introduction: In this article i am going to explain how to generate row number/serial number with the result set returned by the select ...
SQL SERVER: Generate Row Number/Serial Number with each row.
Introduction: In this article i am going to explain how to generate row number or we can say serial number with the result set returned ...
Sql Server: How to remove multiple spaces from a string
Introduction: In this article i am going to explain how to remove all spaces that may be present in the beginning(leading spaces) or at ...
Using MERGE in SQL Server to Insert, Update and Delete in Single Statement
Introduction: In this article I am going to explain what is MERGE Statement in SQL and How to perform insert, update and delete operatio...
Most Important SQL Server Interview Questions and Answers
Introduction: In this article i am going to explain frequently asked top most important sql server interview questions and answers. Th...
SQL SERVER: Convert Table Data to XML Format using FOR XML PATH()
Introduction : In this article I am going to explain how to convert sql table data to different xml format using FOR XML PATH(). In...
Sql Server: User Defined Function to Get All Dates Between Two Dates
Introduction : In this short article I am going to share how to create a table valued user defined function to get all dates between speci...
Subscribe to:
Posts (Atom)