SQL Server/T-SQL Tutorial/User Role/ALTER AUTHORIZATION

Материал из SQL эксперт
Перейти к: навигация, поиск

Create a user and a table, and make the user the owner of the table

   <source lang="sql">

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></source>