Feed on
Posts
Comments

This function uses NEWID() function to create a random password with 8 symbols length:

DECLARE @generated_password varchar(8)
       
SET @generated_password = LEFT(CONVERT(varchar(255), NEWID()), 8 )

SELECT @generated_password

,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • dzone
  • Netscape
  • digg
  • YahooMyWeb
  • Technorati

2 Responses to “How to Create a Random Password in MS SQL”

  1. on 15 Dec 2006 at 1:29 pm mate

    simple and nice ;)

    thanks!

  2. […] If you are looking for the same functionality in MS SQL click here. MySQL, Random Password, T SQLShare and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages. […]

Trackback URI | Comments RSS

Leave a Reply

This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

You must read and type the 5 chars within 0..9 and A..F, and submit the form.

  

Oh no, I cannot read this. Please, generate a