DEFINITIONS

Definitions More Info.
Definition ID586
TitleSQL
CategoryNOTES
DefinitionSQL inserting random number
Definition DescriptionDECLARE @counter smallint; SET @counter = 1; WHILE @counter < 5 BEGIN SELECT RAND() Random_Number SET @counter = @counter + 1 END; GO -- Şayet sayının ondalıksız olmasını istiyorsak, aşağıdaki sorguyu çalıştırmamız yeterli. DECLARE @counter int; SET @counter = 1; WHILE @counter < 100 BEGIN print @counter SELECT CONVERT(INT, RAND()*100) Random_Number SET @counter = @counter + 1 END; GO
RecordBycunay
Record Date22-09-2014 12:11:31
Düzenle
Kopyala
Sil