Data Types
A data type is an attribute that specifies the type of data that the object can hold: integer data, character data, monetary data, date and time data, binary strings, and so on.
A data type is an attribute that specifies the type of data that the object can hold: integer data, character data, monetary data, date and time data, binary strings, and so on.
The properties of a field describe the characteristics of data added to that field. A field's data type is the most important property because it determines what kind of data the field can store.
You can find more detailed information at https://docs.microsoft.com/en-us/dotnet/api/system.data.sqldbtype?redirectedfrom=MSDN&view=net-6.0
Data Type | Description |
---|---|
Bool | A logical field can be displayed as Yes/No, True/False, or On/Off. |
Byte | An unsigned 8-bit integer value from 0 to 255 |
Byte[] | An array of type Byte. A fixed-length stream of binary data ranging between 1 and 8,000 bytes. |
DateTime | A date and time combination. Format: YYYY-MM-DD hh:mm:ss. Can represent date and time data ranging in value from January 1, 1753 to December 31, 9999 to an accuracy of 3.33 milliseconds. |
Decimal | A fixed precision and scale numeric value between -10 38 -1 and 10 38 -1. The total number of digits is specified in size. The number of digits after the decimal point is specified in the parameter. Extra options are provided to define the decimal more precisely:
In SQL Server, the default maximum precision of numeric and decimal data types is 38. In earlier versions of SQL Server, the default maximum is 28. To learn more about this data type, go to https://docs.microsoft.com/en-us/sql/t-sql/data-types/precision-scale-and-length-transact-sql?view=sql-server-ver15 |
Double | Double-precision floating-point. Will handle most decimals |
Float | Floating-point data types, usually represent values as high-precision fractional values. A fixed precision and scale numeric value between -10 38 -1 and 10 38 -1. |
Guid | The GUID data type is useful when you want to uniquely identify some data, so that it can be exchanged with external applications. The correct format of the GUID string is {CDEF7890-ABCD-1234-ABCD-1234567890AB} where 0-9, A-F symbolizes hexadecimal digits. To learn more about this data type, go to https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/guid/guid-data-type#format |
Int | A 32-bit signed integer representing a whole number between -32,768 and 32,767 |
Long | A whole number between -2,147,483,648 and 2,147,483,647 |
Sbyte | The SByte data type represents integers with values ranging from negative 128 to positive 127. |
Short | The Short Int16 data type represents signed integers with values ranging from negative 32768 through positive 32767. |
String | A FIXED length string that may contain letters, numbers, and special characters up to a maximum of 4000 characters.
|
TimeSpan | The timespan (time) data type represents a time interval, where a number of formats are supported for value, as shown at https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/timespan |