Adding a new column to an existing table??? Check the rules first

Hi All, So, you are standing at the gates where you need to add a new COLUMN to an existing table. Well, there are 2 cases: Table is empty Table contains data If “Table is empty” then you are still in design-phase of that table. Add new column whichever the way you know 🙂 E.g. …

Continue reading ‘Adding a new column to an existing table??? Check the rules first’ »

What happens to IDENTITY Column Value When SQL Transaction Fails??

Hi All, I would like to share a simple interview question. This is very simple yet many developers overlooks or not taking care of it. Do you know what happens to identity value if transaction fails? Do you think that identity value of table is unchanged after failure? Before looking at the solution below, try …

Continue reading ‘What happens to IDENTITY Column Value When SQL Transaction Fails??’ »