On Sakila Database we have table category represented categories of movies in DB and table film_category where each film linked it it's category (one film can be present in more then one category).
The simplest way to fix order in primary key column is drop it and create again. Assume we have the test where id is column values not in order
Assume we have 3 tables items, categories and item_categories where stored records about items, categories and relations between them
Assume we have table with integer column. How we can find is all values of this column are sequence without gaps or duplicates.
One more case using CTE (common table expressions). Assume we have table of financial transactions like posted below, where Id is transaction identifier integer auto increment without gaps, Type is D for deposits and W for withdrawals
MySQL solution (using rlike):
Assume we have table stored values within json array. For example:
Let we have some one table contains duplicates values:
For example we have table with customer loan applications, where each customer provide count of child. For simplify task let it be table with 2 columns: name and childs
Question: What are the possible ways to determine the deployed SQL Server version?