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,783 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

744 reads

Blogs

A New Word: Incidental Contact High

By

incidental contact high – n. an innocuous touch by someone just doing their job...

Azure PostgreSQL Flexible Server and Entra Groups

By

My company is moving from an Azure PostgreSQL single server to a flexible server....

Take the 2025 State of Database Landscape Survey

By

The survey is out now and you can share your experiences for a chance...

Read the latest Blogs

Forums

GIT Configuration and Automated Release for Azure Data Factory

By Sucharita Das

Comments posted to this topic are about the item GIT Configuration and Automated Release...

How to Add a New Shared Disk to a WSFC as a SQL Resource

By muhkam

Comments posted to this topic are about the item How to Add a New...

Knowing What You Don't Know

By Louis Davidson (@drsql)

Comments posted to this topic are about the item Knowing What You Don't Know

Visit the forum

Question of the Day

Am I on Synapse?

How can I tell from T-SQL if I'm connected to SQL Server or Synapse Analyics?

See possible answers