Querying Microsoft SQL Server

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,857 reads

Blog Post

Frequently asked SQL Server Queries

Data to test:
CREATETABLE [dbo].[emp](      [emp_id]
[nchar](10)NULL,      [emp_name]
[nchar](10)NULL,      [salary]
[int] NULL)ON [PRIMARY] insert emp( emp_id,emp_name,salary )  select'1','ABC',-20000 insert emp( emp_id,emp_name,salary )  select'2','XYZ',-5000 insert emp( emp_id,emp_name,salary )  select'3','PQR',-7800 insert emp( emp_id,emp_name,salary...

2013-02-04

750 reads

Blogs

When the Internet Stumbles: Lessons from Cloudflare & Azure Front Door Outages

By

Recently, the world was reminded of just how fragile the internet can be.  Two...

Prepping for Certification, Part 4 of 4

By

In Parts 1-3, I covered how I prepare for a certification exam. In this...

Flyway Tips: Automation Assistance in Flyway Desktop

By

I was chatting with the product managers at Flyway and one asked me whether...

Read the latest Blogs

Forums

what are the downsides of TDE not running vs running?

By stan

hi for the 2 years i've been here I believe we've had "encryption" turned...

Help! MEMORY_ALLOCATION_EXT wait stalls

By krypto69

Hi I have an overnight process that moves allot of claims records Been working...

Unlocking Data Transformation: My journey with dbt (Data Build Tool) on SQL Server

By ashok.gadiparthi

Comments posted to this topic are about the item Unlocking Data Transformation: My journey...

Visit the forum

Question of the Day

Putting the Player with the Number

In SQL Server 2025, what does this return?

DECLARE @player varchar(20) = 'Bo Nix',
@num VARCHAR = '10'

SELECT @player || @num

See possible answers