Create a user and a table, and make the user the owner of the table : ALTER AUTHORIZATION « User Role « SQL Server / T-SQL Tutorial






7> CREATE USER Javier
8> WITHOUT LOGIN
9> GO
1>
2> --Create a table
3> CREATE TABLE JaviersData
4> (
5>     SomeColumn INT
6> )
7> GO
1>
2> --Set Javier as the owner of the table
3> ALTER AUTHORIZATION ON JaviersData
4> TO Javier
5> GO
1>








28.4.ALTER AUTHORIZATION
28.4.1.Create a user and a table, and make the user the owner of the table