Posts Tagged ‘database’

I had a situation today, I accidentally executed SQL insert script twice. The bad thing was that the table had no primary key or unique key defined which may have stopped it from execution. Lesson: Not having Primary keys is a bad idea So, now I can not delete each row manually so I had […]


Finding highest or lowest number in a column is easy, you can do that with max() and min() SQL function. But I had recently been asked in an interview to write a query that could find the second highest value in a table column. Ooops, and I didn’t do well in that interview either.LOL Before […]