One of the frequently ask SQL questions in any programming interviews is what is the difference between VARCHAR and CHAR data type in SQL?…
Did you ever face a situation where some of your innocuous looking action has cause production issue and that too big time? Well, I hope yo…
One of the most common SQL Interview question on Programming interview is to select some rows from a table which also contains null values…
One of the common question on Microsoft SQL Server interview is, what is the difference between GETDATE() , SYSDATETIME() , and GETUTCDATE(…
It's tricky to use dates in SQL server query, especially if you don't have good knowledge of how DateTime type works in SQL server.…
The GETDATE is one of the most popular built-in methods of Microsoft SQL Server, but unlike its name suggest, it doesn't return just …
Though all three are ranking functions in SQL, also known as window function in Microsoft SQL Server, the difference between rank() , dense…
There are a couple of ways to remove duplicate rows from a table in SQL e.g. you can use a temp tables or a window function like row_number…
Since a primary key is nothing but a constraint you can use ALTER clause of SQL to add a primary key into existing table. Though it's …
Cursor in a database is used to retrieve data from the result set, mostly one row at a time. You can use Cursor to update records and perfo…
Sometimes, you need the result of SQL SELECT clause as a comma separated String e.g. if you are outputting ids of white-listed products. By…
You can increase the length of a VARCHAR column without losing existing data in SQL Server. All you need to do is that execute following …
It's a little bit tricky to delete from a table while using any type of JOIN in SQL e.g. Inner Join, Left Outer Join , or Right Outer J…