A couple of weeks back, I ran a contest with MONTH () function and had close to 300 of you answer the puzzle. It was a great brain teaser and we had an awesome response from you. Most of you got the answer right and it is great to see you folks getting the basics right.
SQL SERVER – Know Your Backup Before Deleting Database
Earlier last week I wrote a blog around, SQL SERVER – FIX – Msg 3702, Level 16, State 3 – Cannot Drop Database “DB_Name” Because it is Currently in Use. The premise of that blog was driven by some of the demo’s I show at conferences. During one of the UG…
Read MoreInterview Question of the Week #023 – Error Handling with TRY…CATCH
Here is one of the most popular question I see people discussing in SQL Interviews. Question – How do you handle errors with the help of TRY…CATCH? Answer – TRY/CATCH helps to write logic separate the action and error handling code. The code meant for the action is enclosed in…
Read MoreSQL SERVER – Basic Statistics Maintenance – Notes from the Field #083
[Note from Pinal]: This is a 83rd episode of Notes from the Field series. Maintenance of the database is very critical activity and I have always seen DBA taking it very seriously. There is a only one problem – there is no single solution or guidance for how to maintain the database.…
Read MoreSQL SERVER – Finding Out Identity Column Without Using Column Name
There is an interesting observation when querying the identity column of a table Let us create the following tables CREATE TABLE test1 ( id INT IDENTITY (1,1) ) GO CREATE TABLE test2 ( id INT ) Note that the table test1 has identity column and table test2 does not have…
Read More
