<p>Just what the title says, I need to change the password for an existing sql server login and I want to do it via sql script.</p>

[{'answer_id': 56927, 'author': 'Brannon', 'author_id': 5745, 'author_profile': 'https://Stackoverflow.com/users/5745', 'pm_score': 5, 'selected': True, 'text': '<p>ALTER LOGIN</p>\n\n<p><a href="http://msdn.microsoft.com/en-us/library/ms189828.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/ms189828.aspx</a></p>\n'}, {'answer_id': 6172468, 'author': 'bkaid', 'author_id': 265570, 'author_profile': 'https://Stackoverflow.com/users/265570', 'pm_score': 3, 'selected': False, 'text': "<pre><code>alter login mylogin with password = 'mylogin'\n</code></pre>\n"}, {'answer_id': 10925471, 'author': 'Nagendra Mishr', 'author_id': 1441254, 'author_profile': 'https://Stackoverflow.com/users/1441254', 'pm_score': 5, 'selected': False, 'text': "<p>If the user already has the ALTER ANY LOGIN permission (i.e. the user can change any password for any user) then this works:</p>\n\n<pre><code>alter login mylogin with password = 'mylogin'\n</code></pre>\n\n<p>Otherwise, if you don't want to make every user in your system a superuser, add a parameter of the old password for the same command:</p>\n\n<pre><code>alter login mylogin with password = 'mylogin' old_password='oldpassword'\n</code></pre>\n"}]
['https://Stackoverflow.com/questions/56923', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1642688/']