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

741 reads

Blogs

Going to Cloud? Look at the Shared Responsibility Model

By

The bottom line here is this: the idea that a CSP takes care of...

How Long Will It Take to Learn SQL? The Truth Might Surprise You

By

In today's data-driven world, SQL (Structured Query Language) is a blazing-hot skill. It's your...

Flying Halfway Around the World to Australia

By

I leave tonight for Australia. I was in London 3 days ago, so this...

Read the latest Blogs

Forums

Fine-tune SQL for better performance

By don075

I have been asked to fine-tune the following SQL that was written by a...

Row-level security in SQL server

By dzukik0711

In this scenario, I seek assistance in implementing row-level permissions for a table named...

SSIS Web Service task SSL errors

By smithloo

I've tried different credentials, target server versions, etc. hitting our Primavera WSDL. Works great...

Visit the forum

Question of the Day

Initial Config of tempdb

What are the initial config sizes for the tempdb primary data files, secondary data files, and log files in SQL Server 2022?

See possible answers