I want to write an store procedure in SQL that:
it has two parameters for login Name and password. I write this code. but it has some errors.
USE DreamHome_Rental SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE usp_cteateLogin @lgnName NVARCHAR(10), @pswrd NVARCHAR(10) AS BEGIN CREATE LOGIN @lgnName WITH PASSWORD=@pswrd END GO
how can I do this?
and I want do this with out using sp_addlogin because MSDN writes: "This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use CREATE LOGIN instead. "