Feeds:
Posts
Comments

Archive for the ‘SQL Puzzle’ Category

I would like to welcome all of you to very first editorial for T-SQL Challenges for Beginners. T-SQL Challenges began with the aim to help community to come out of regular mind set of just reading articles online. There is plenty of reading material available online, but there are very few that can make us [...]

Read Full Post »

SQL Server never stops to amaze me. As regular readers of this blog already know that besides conducting corporate training, I work on large-scale projects on query optimizations and server tuning projects. In one of the recent projects, I have noticed that a Junior Database Developer used the query hint Force Order; when I asked [...]

Read Full Post »

Working with SQL Server has never seems to be monotonous – no matter how long one has worked with it. Quite often, I come across some excellent comments that I feel like acknowledging them as blog posts. Recently, I wrote an article on SQL SERVER – Execution Plan and Results of Aggregate Concatenation Queries Depend [...]

Read Full Post »

Recently, I was working on an optimization project for one of the large organizations. While working on one of the queries, we came across a very interesting observation. We found that there was a query on the base table and when the query was run, it used the index, which did not exist in the [...]

Read Full Post »

I was reading the blog of Ward Pond, and I came across another note of Microsoft. I really found it very interesting. The given explanation was very simple; however, I would like to rewrite it again.
Let us execute the following script. This script inserts two values ‘A’ and ‘B’ in the table and outputs a [...]

Read Full Post »

About a week ago, SQL Server Expert, Imran Mohammed, provided a script, which will list all the missing identity values of a table in a database. In this post, I asked my readers if any could write a similar or better script. The results were interesting. While no one provided a new script, my question [...]

Read Full Post »

In one of my recent projects, a large database migration project, I confronted a peculiar situation. SQL Server tables were already moved from Database_Old to Database_New. However, all the Primary Key and Foreign Keys were yet to be moved from the old server to the new server.
Please note that this puzzle is to be solved [...]

Read Full Post »

Does the title of this post trigger your mind? If you all remember, a few days back I had written an article on my interesting observation regarding logon triggers. I would advise you to first read SQL SERVER – Interesting Observation of Logon Trigger On All Servers before continuing with this article further to have [...]

Read Full Post »

One of my friends – a SQL Server MVP- Jacob Sebastian has a knack for coming up with interesting ideas and stuffs, the latest example being SQL Server Puzzles on his blog. Jacob is a regular blogger and a talented writer. I enjoy reading his blogs and books. He has recently published his new book [...]

Read Full Post »

Today I received email from Yoel from Israel. He is one smart man always bringing up interesting questions. Let us see his latest email first.
Hi Pinal,
I am subscribed to your blog and enjoy reading it. I have a question which has been bothering me for some time now.
When I want to filter records in a [...]

Read Full Post »

Older Posts »