Clearly, an index build on only one column of the bit type is useless because the selectivity is poor (50% of a table in average). However, when a table has several columns of the bit type, the composite index may be efficient.
For the test example, we'll create a table and fill it with random data.
The one of the most frequent asked question in database development is "How to filter the data returned by a query according to some user selected criteria?". To complete the solution with dynamic ordering see my other blog post.
For every method template I will add icons indicating corresponding advantages and drawbacks.
A quine is a computer program which takes no input and produces a copy of its own source code as its only output. The challenge for programmers is to write the shortest code in the given language. Here are my examples in Transact SQL and in ANSI SQL.
Note that we do not take in account the output format printing by any console SQL clients. For example, we are unable to suppress the output of column names or separators in the common case.