Efficient Table Migration to a New Schema in T-SQL
This article will explain why and how you can easily move tables to new schemas if the need arisees.
2024-10-31 (first published: 2023-11-03)
3,939 reads
This article will explain why and how you can easily move tables to new schemas if the need arisees.
2024-10-31 (first published: 2023-11-03)
3,939 reads
Learn about the benefits of mixed extent allocation in SQL Server 2016, along with how you can check this setting or enable it in your database.
2024-01-10
2,007 reads
This short piece explains the value of maximum server memory and shows you how to change this.
2023-12-27
5,978 reads
Learn how to use CTEs through the use of a number of examples.
2023-10-20
10,737 reads
To move a table into a schema in T-SQL, you can use the ALTER SCHEMA statement along with the TRANSFER option. Here are the steps to do this: Assuming you have an existing schema named "NewSchema" and a table named "YourTable" that you want to move into this schema: Open SQL Server Management Studio or […]
2023-09-29 (first published: 2023-09-18)
5,887 reads
You will learn how a blockchain works and then use a SQL database to analyze data from a series of transactions.
2023-09-08
5,263 reads
2023-08-18
11,192 reads
Learn how to get started with Google Cloud MySQL and PostgreSQL databases by creating and configuring a database.
2023-05-26
1,083 reads
By Steve Jones
This is timely, as I’m currently on a boat in the Adriatic taking a...
You can find the slides and SQL scripts for my session “Spice up your...
By SQLPals
How to Clear the SSMS Cache (SSMS 21 and Later) Updated...
Comments posted to this topic are about the item Using CHOOSE()
Comments posted to this topic are about the item Re-Seeding a Broken Log Shipping...
Comments posted to this topic are about the item The DBA is Dead! Long...
We have this code that sets some status values and then queries them using the CHOOSE() function in SQL Server 2025.
CREATE TABLE Status
(
StatusID INT,
StatusDescription VARCHAR(20)
);
GO
INSERT dbo.Status
(
StatusID,
StatusDescription
)
VALUES
(0, 'Uncategorized'),
(1, 'Active'),
(2, 'Inactive'),
(3, 'Temp');
GO
SELECT CHOOSE(StatusID, 'Unknown', 'Active', 'Inactive', 'Temporary')
FROM Status;
When the SELECT runs, what is returned? See possible answers