QuestionQ66
VerifiedSecure, optimize, and deploy database solutionsYou have an Azure SQL database that contains a table named Table1. Table1 has 25,000,000 rows and a datetime2 column named DateKey. Its data spans the years 2020 through 2021.
You need to partition the data in Table1 by year. The solution must minimize the time needed to rebuild or reindex the table.
How should you complete the Transact-SQL code?
Select
CREATE PARTITION FUNCTION PartitionByYear (datetime2) AS FOR VALUES ();
Community Discussion