Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The .NET Framework Data Provider for SQL Server (SqlClient) provides the following system functions:
Function | Description |
---|---|
CHECKSUM (value, [value, [value]]) |
Returns the checksum value. CHECKSUM is intended for use in building hash indexes. Arguments value: A Boolean, Byte, Int16, Int32, Int64, Single, Decimal, Double, DateTime, String, Binary, or Guid. You can specify one, two or three values. Return Value The absolute value of the specified expression. Example
|
CURRENT_TIMESTAMP () |
Produces the current date and time in SQL Server internal format for DateTime values with a precision of 7 in SQL Server 2008 and a precision of 3 in SQL Server 2005. Return Value The current system date and time as a DateTime. Example
|
CURRENT_ USER () |
Returns the name of the current user. Return Value An ASCII String. Example
|
DATALENGTH (expression) |
Returns the number of bytes used to represent any expression. Arguments expression: A Boolean, Byte, Int16, Int32, Int64, Single, Decimal, Double, DateTime, Time, DateTimeOffset, String, Binary, or Guid. Return Value The size of properties as an Int32. Example
|
HOST_NAME() |
Returns the workstation name. Return Value A Unicode String. Example
|
ISDATE(expression) |
Determines whether an input expression is a valid date. Arguments expression: A Boolean, Byte, Int16, Int32, Int64, Single, Decimal, Double, DateTime, Time, DateTimeOffset, String, Binary, or Guid. Return Value An Int32. One (1) if the input expression is a valid date. Zero (0) otherwise. Example
|
ISNUMERIC(expression) |
Determines whether an expression is a valid numeric type. Arguments expression: A Boolean, Byte, Int16, Int32, Int64, Single, Decimal, Double, DateTime, Time, DateTimeOffset, String, Binary, or Guid. Return Value An Int32. One (1) if the input expression is a valid date. Zero (0) otherwise. Example
|
NEWID() |
Creates a unique value of type Guid. Return Value A Guid. Example
|
USER_NAME(id) |
Returns a database user name from a specified identification number. Arguments expression: An Int32 identification number associated with a database user. Return Value A Unicode String. Example
|
For more information about the string functions that SqlClient supports, see the documentation for the SQL Server version that you specified in the SqlClient provider manifest:
SQL Server 2000 | SQL Server 2005 | SQL Server 2008 |
---|---|---|
See Also
Concepts
Entity SQL Language
SqlClient for Entity Framework Functions