Question: How to Invalidate Procedure Cache in SQL Server?
Interview Question of the Week #032 – Best Practices Around FileGroups
Here is another question I just heard during a recent interview in the multinational company. I have observed over 1000s of interview, but this is the first time I have heard this is being discussed and I was very much glad to hear it. I have listed the answer of…
Read MoreInterview Question of the Week #031 – How to do Case Sensitive SQL Query Search
Question – How to do case sensitive search on any column of the table? Answer – If Column1 of Table1 has following values ‘CaseSearch, casesearch, CASESEARCH, CaSeSeArCh’, following statement will return you all the four records. SELECT Column1 FROM Table1 WHERE Column1 = 'casesearch' To make the query case sensitive and…
Read MoreInterview Question of the Week #030 – Retrieve Last Inserted Identity of Record
Question: What are the different ways of retrieving the identity of last inserted record? Which method do you prefer? Answer: There are many different ways to do that. Here are three different ways to retrieve the identity of the last inserted record. I personally use SCOPE_IDENTITY () to return the identity…
Read MoreInterview Question of the Week #029 – Difference Between CHARINDEX vs PATINDEX
Question: What is the difference between CHARINDEX vs PATINDEX? Answer: We can use either CHARINDEX or PATINDEX to search in a TEXT field in SQL SERVER. The CHARINDEX and PATINDEX functions return the starting position of a pattern you specify. Both functions take two arguments. With PATINDEX, you must include percent signs before and…
Read MoreInterview Question of the Week #028 – Few SQL Best Practices
Just last week, I moderated a SQL Server interview and I heard very interesting conversation. Question –Â What are the best practices are you following for SQL Server? When I heard this question – I thought candidate will answer many different things, but he was stunned and had nothing much to…
Read MoreInterview Question of the Week #027 – Move TempDB from One Drive to Another Drive When Low Disk Space
Here is one of the important interview question which is related to TempDB and how to Move TempDB from One Drive to Another Drive When Low Disk Space.