[MSSQL] 랜덤 난수 생성
2014. 5. 14. 14:46ㆍIT
--==============================
--기본적으로 6자리로 설정(999999)
--==============================
Declare @maxRandomValue int, @minRandomValue int;
Select @maxRandomValue = 999999, @minRandomValue = 0;
Select randomNumber = Cast(((@maxRandomValue + 1) - @minRandomValue) * Rand() + @minRandomValue As int);
'IT' 카테고리의 다른 글
[Windows Server] Windows IIS -> FTP 한글파일명 업로드 안될때 (0) | 2018.09.05 |
---|---|
[JavaScript] input file 파일 확인 (0) | 2014.05.29 |
[MSSQL] BASE64 함수 (0) | 2014.05.08 |
[MSSQL] 숫자만 뽑아내는 함수 (0) | 2014.03.21 |
[MSSQL] 0으로 나누기 오류가 발생 (0) | 2014.03.20 |