Blog Post

Generate Random Passwords using T-SQL

Use following script to generate random Passwords
DECLARE @id int,@list varcharSET @list ='abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ23456789.,-_!$@#%^&*'selectreplace(SUBSTRING(CONVERT(varchar(255),NEWID()),8, 8),'-','')as RANDOM

Example:
Suppose you have a table tblUser with columns[id],[userid],[password].
CREATETABLE [dbo].[tblUser](     ...

2013-02-12

4,875 reads

Blogs

The GO Barrier: Why SSMS Multi-Server Query Waits for the Slowest Connection

By

I deployed a schema change to 30 servers using multi-server query and deploy-at-low-priority. Small...

10 Things I Hate About Fabric Deployment Pipelines— And Some Alternatives

By

Fabric deployment pipelines look like they solve CI/CD for Fabric content, especially for people...

The Book of Redgate: Evidence

By

We aren’t the only company that does this, but Redgate Software does try to...

Read the latest Blogs

Forums

Massive Table Growth Issue – How to Set Up Filegroup Usage Alerts?

By abdalah.mehdoini

Hello We recently encountered an issue where a SQL table unexpectedly grew in size...

The New World Of AI Robots

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The New World Of AI...

Logic question in a WHERE clause using IIF?

By DaveBriCam

Thanks in advance, I'm trying to avoid using IIF for performance reasons, but the...

Visit the forum

Question of the Day

BIT_COUNT() V

What does this return on SQL Server 2025?

select bit_count(null)

See possible answers