Mega Code Archive

 
Categories / MSSQL Tutorial / User Role
 

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

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>