• Jeff Moden - Monday, June 25, 2018 8:26 AM

    Sean Lange - Monday, June 25, 2018 7:26 AM

    We require our developers to do almost all of their own t-sql. The last couple rounds of hiring I used this question having seen Jeff mention it so many times. It is truly shocking how many people that rate themselves as advanced with t-sql and writing procedures for 5-10 years can't answer that. Two rounds ago we interviewed about 12-15 candidates just for a 6 month contract (it took that many interviews to find one). I started each interview the same way by explaining how our devs write their own procedures and we require some level of competence. And by telling them we will have technical questions that will increase in difficulty but none of them are trick questions and the simple answer is really what we are looking for. My first question was "can you tell me how to get the current system time using t-sql". Out of those 12-15 exactly one of them knew the answer. That person tentatively said "getdate" with a question mark. You could tell the response was "seriously? Is it really that simple?". Of the others they either say they don't know or make up some incredibly interesting stories about how they never needed to know the current time for anything or say things like "DateTime.Now".

    Heh... glad to hear I'm not the only one that has experienced this.

    Like I said before, I originally started asking the question to set people at ease because I thought it was such a simple question.  I couldn't believe that it turned out to be a litmus strip.

    The other interesting one I like to ask is if they know what sql injection is and some simple ways to avoid it. You should try that one out. I have heard some unbelievably interesting responses that. One guy was going on for nearly 5 minutes discussing how you can use dotnet reflection to use sql injection for performance benefits. I am not kidding.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/