In the example of the int type, default maximum value is 2000000000 (as in the image above). The default values are from 0 to a rounded number closest to the maximum for that type. The same rule is applied to all other numeric SQL types. For instance, if the selected column is of an int type, the minimum value is -2,147,483,648 and maximum value is 2,147,483,647, according to the definition of the int SQL type. The lowest and highest value which can be set in the Min and Max value fields depend on the SQL type of the column for which this generator is chosen. It is used for all numeric (int, float, decimal, smallint, etc.) SQL types. This type of generator creates a single random number for each row from the given range of values. Minimum value cannot go below 1 and Maximum value cannot go above the value defined in the SQL type. To switch between static and variable length of the string generated for each row, Variable length option is used. 100 characters) or to a random number in a given range from Minimum up to Maximum length. The number of characters for each row can be set to a static value (i.e. For nvarchar(100) type, maximum length is 100 (as in the picture above). For instance, if a column is of a nvarchar(25) type, the maximum length of the generated string for each row cannot go above 25. The maximum number which can be set in the Length field depends on the definition of the given SQL type. The number of characters in one row is set through the Length value. The Character random generator is used for any character (char, nvarchar, text) and binary SQL type. This type of random generator creates a series of random characters of a specific length. Universal – used for generating random values for all other SQL types (xml, GUID, hierarchyId, etc.).Spatial – generates random values for geography and geometry SQL types from the given range.Image – generates random binary values representing the SQL image type with dimensions from the given range.Datetime – generates random dates in a given range.Numeric – generates random numeric values in a given range.Character – generates a series of random characters.There are 6 different types of random generator: The options and functionality of the generator depend on the SQL type of the column for which it is set. The Random generator can be set for a column of any SQL type. The percentage value is assigned through the % of null option. The number of NULL values is determined as the percentage of requested row number for the table containing the selected column. Allow null – inserts the NULL values into the generated sequence.If a column has a unique constraint assigned to it, this option is automatically checked Unique – filters out all repeating values from the generated sequence, leaving only one instance of each value.Seed value – determines the order of values in the generated sequence.The Random generator has 3 options which are present for any given SQL type: More info on the Seed and the way it affects the generated sequence can be found on this link. The generated sequence of values is created in the pseudo-random (seeded random) manner, which means that the sequence depends on the value of Seed. The Random generator creates a sequence of randomized values from the start up to the end value. Also, it shows how it works for basic SQL data types. This article explains how to generate randomized data in ApexSQL Generate by using the Random generator.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |