Microsoft sql bit data type




















User-defined types obtain their characteristics from the methods and operators of a class that you create by using one of the programming languages support by the. When two expressions that have different data types, collations, precision, scale, or length are combined by an operator, the characteristics of result are determined by the following:.

In SQL Server, based on their storage characteristics, some data types are designated as belonging to the following groups:. Large object data types: text , ntext , image , varbinary max , and xml. Spatial Geometry Types. Spatial Geography Types. Skip to main content. View all page feedback. In this article. Signed, exact, numeric value with a precision of at least p and scale s.

The maximum precision is driver-defined. Signed, approximate, numeric value with a binary precision 24 zero or absolute value 10[] to 10[38]. Signed, approximate, numeric value with a binary precision of at least p. Signed, approximate, numeric value with a binary precision 53 zero or absolute value 10[] to 10[]. Year, month, and day fields, conforming to the rules of the Gregorian calendar.

See Constraints of the Gregorian Calendar , later in this appendix. Hour, minute, and second fields, with valid values for hours of 00 to 23, valid values for minutes of 00 to 59, and valid values for seconds of 00 to Precision p indicates the seconds precision.

Functions return bigint only if the parameter expression is a bigint data type. SQL Server does not automatically promote other integer data types tinyint , smallint , and int to bigint. Therefore, similar expressions in queries can sometimes produce different results. When a query is not autoparameterized, the constant value is first converted to numeric , whose precision is just large enough to hold the value of the constant, before converting to the specified data type.

For example, the constant value 1 is converted to numeric 1, 0 , and the constant value is converted to numeric 3, 0. When a query is autoparameterized, the constant value is always converted to numeric 10, 0 before converting to the final data type. Integer constants greater than 2,,, are converted to the decimal data type, not the bigint data type. The following example shows that when the threshold value is exceeded, the data type of the result changes from an int to a decimal.



0コメント

  • 1000 / 1000