Microsoft SQL Server Links

Links, articles, scripts, tips, and other technical sources for managing SQL Server. DBALinks is dedicated to SQL Server and database administration.

CHECK OUR BLOGS!

 

 
BLOGS Minimize
Print  
 
SEARCH BLOGS Minimize

Print  
 
DOWNLOADS... Minimize
Print  
 
BOOKS... Minimize

Print  
 
Advertisement Minimize

 

Print  
 
T-SQL
Author: Alex Created: Monday, September 17, 2007
T-SQL

How to generate a random number in SQL Server

 

To genereate a random number in SQL Server we can use random function.  Check example below where a random generated number is between 1 and 100:

select rand()
select rand() * 100
select cast(rand() * 100 as int) as number

 

Comments (0)
By Alex on Wednesday, October 15, 2008

LOGINPROPERTY - information about login policy settings
LOGINPROPERTY (information about login policy settings)
 
LOGINPROPERTY function returns information about the password policy settings of a SQL Server login.
The names of the properties are not case sensitive.
NULL will be returnd if the login is not a valid SQL Server login.
< ...
Comments (0) More...
By Alex on Wednesday, October 15, 2008

Create a foreign key on an existing table in SQL Server
Use code below to create a foreign key on an existing table in SQL Server ALTER TABLE Table1 ADD FOREIGN KEY (Column_Name) REFERENCES Table2(Column_Name)
Comments (0) More...
By Alex on Wednesday, October 15, 2008

 
Announcements Minimize
SQL Server Service Pack Versions - Thursday, October 30, 2008
Version @@VERSION MsDtsSrvr.exe File Version Registry Version Registry Patch Level
Release to Manufacturing 9.00.1399.00 9.0.1399.0 9.0.1399.06 9.0.1399.06
Service Pack 1 9.00.2047.00 9.0.2047.0 9.1.2047.00 9.1.2047.00
Post SP1 Cumulative Hotfix 9.0.2153.00 9.0.2153.0 9.1.2047.00 9.1.2153
Service Pack 2 CTP 9.00.3027.00 9.0.3027.0 9.2.3027.00 9.2.3027.00
Service Pack 2 9.00.3042.00 9.0.3042.0 9.2.3042.00 9.2.3042
Service Pack 2 Rollup 3 9.00.3186.0 9.00.3186.00 9.2.3042.00 9.2.3186
 

Print