Quick Reference
This is a quick reference list of SQL Server advanced functions and how they are used to work with databases.
- SQL – SQL Server CAST() FunctionThe SQL Server CAST() function converts a value of any type into a specified datatype.
- SQL – SQL Server COALESCE() FunctionThe SQL Server COALESCE() function returns the first non-null value in a list.
- SQL – SQL Server CONVERT() FunctionThe SQL Server CONVERT() function converts a value of any type into a specified datatype.
- SQL – SQL Server CURRENT_USER FunctionThe SQL Server CURRENT_USER function returns the name of the current user in the SQL Server database.
- SQL – SQL Server IIF() FunctionThe SQL Server IIF() function returns a value if a condition is TRUE, or another value if a condition is FALSE.
- SQL – SQL Server ISNULL() FunctionThe SQL Server ISNULL() function returns a specified value if the expression is NULL, and the expression itself if the expression is NOT NULL.
- SQL – SQL Server ISNUMERIC() FunctionThe SQL Server ISNUMERIC() function tests whether an expression is numeric, and returns 1 if the expression is numeric and 0 if it is not numeric.
- SQL – SQL Server NULLIF() FunctionThe SQL Server NULLIF() function returns NULL if two expressions are equal, or returns the first expression if they are not equal.
- SQL – SQL Server SESSION_USER FunctionThe SQL Server SESSION_USER function returns the name of the current user in the SQL Server database.
- SQL – SQL Server SESSIONPROPERTY() FunctionThe SQL Server SESSIONPROPERTY() function returns the session settings for a specified option.
- SQL – SQL Server SYSTEM_USER FunctionThe SQL Server SYSTEM_USER function returns the login name for the current user.
- SQL – SQL Server USER_NAME() FunctionThe SQL Server USER_NAME() function returns the database username based on the specified id.
SQL Notes:
- Any work being done to modify the structure of a database or delete tables or the the database itself should only be done after making a recent backup
We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.