Declare @LoginName nvarchar(100)
Declare @Password nvarchar(100)
Declare @SQL nvarchar(max)
Begin
Set @LoginName = 'TestAdmin'
Set @Password = 'pass@word1'
Set @SQL = 'Create Login ' + @LoginName + ' with Password = ''' + @Password + ''''
EXEC sp_executesql @SQL
EXEC sp_addsrvrolemember @LoginName, 'sysadmin'
select * from sys.sql_logins
End