Skip to content

AUTHORIZATION

CREATE DATABASE TestDB
GO
ALTER AUTHORIZATION ON DATABASE::TestDB TO User1
GO

Command(s) completed successfully.

The above SQL code block creates a new database named TestDB in SQL Server. Once the database is successfully created, the second statement changes the authorization of the TestDB database to User1. This means User1 now owns the TestDB database. The output shows that the command execution was successful.