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 Server. Show all posts
Showing posts with label Sql Server. 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: How to check column existence before adding new column in table?
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 check whether column exists in table or not?
Introduction : In this article I am going to explain four methods to check whether column exists in sql table or not. In previous art...
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: 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 ...
SQL Statement Equivalent to Ternary/Conditional Operator
Introduction: In this article I am going to explain how to use alternative of ternary or conditional operator which is not available in S...
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...
Subscribe to:
Posts (Atom)