Transfers ownership of a database or user space to another user. Also transfers all databases and users owned by the transferred database or user.
Required Privileges
You must have the DROP DATABASE privilege on the given object, and the CREATE DATABASE privilege on the recipient.
The GIVE statement does not revoke any explicit privileges on the given database or user. No explicit privileges on the given database or user are granted to the new ownership hierarchy as a result of the GIVE statement, nor does the database or user being given receive any explicit privileges.
The recipient of a GIVE statement cannot be owned by the given object; if A owns B, A cannot be given to B.
Syntax
GIVE { database_name | user_name } TO recipient_name [;]
Syntax Elements
- database_name
- user_name
- Name of the database or user whose ownership is being transferred.
- TO
- Introduction to the name of the recipient.
- recipient_name
- Name of the new immediate owner for the transferred database or user.
Example of Transferring the Ownership of a Database
The following statement transfers ownership of the finance database from user administrator to user Chin.
GIVE Finance TO Chin;
ANSI Compliance
This statement is a Teradata extension to the ANSI SQL:2011 standard.
Other SQL dialects support similar non-ANSI standard statements with names such as the following:
TRANSFER OWNERSHIP