script for dele users

  • Hi,

    we can delete the logins using sp_droplogin..so what is my question is Is exec sp_droplogin 'loginname' will delete the users belongs to that loginname...if yes what is the script for that one...

    Thanks to all..

  • DROP LOGIN [TestLogin] is the current method

    sp_droplogin is the old method and will be removed from SQL at some point.

    From your other post:

    " ... when iam deleting the login ,automatically user also deleted in GUI....

    So I want t-sql script for automatically delete the user when i delete the login belongs to that user....."

    Use the GUI, then choose "Script Action" to generate the t-sql script. "Script Action" is useful to see the t-sql for many of the GUI functions.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply