1. String function length and analysis use DATALENGTH (CHAR_EXPR) Returns the character string contains the number of characters, but does not contain space Substring (Expression, Start, Length), taking a backer string Right (CHAR_EXPR, INT_EXPR) Returns Character String Right INT_EXPR Character Operation Class Upper (CHAR_EXPR) Transforms to Updly LOWER (int_expr) Generating INT_EXPR Sky REPLICATE (CHAR_EXPR, INT_EXPR) Copy String INT_EXPR REVERSE (CHAR_EXPR) Reverse Strings Stuff STUFF (CHAR_EXPR1, START, LENGTH, CHAR_EXPR2) Remove the Ltrim (char_expr) by char_expr2 with CHAR_EXPR2 in the string CHAR_EXPR1 Remove the Ltrim (char_expr) RTRIM (CHAR_EXPR) RTRIM (CHAR_EXPR) to remove the space ASCII (ASCII) two functions, take ASCII Code, according to ASCII Take a string, find Charindex (CHAR_EXPR, EXPRESSION) Returns the starting position of Char_EXPR Returns the starting position of the specified mode, otherwise 0 2. Mathematical function ABS (Numeric_expr Request to take the absolute value CEILING (NuMERIC_EXPR) Take the minimum integer EXP (FLOAT_EXPR) equal to the specified value to take an index floor (numeric_expr) smaller than or equal to the designated value maximum integer PI () 3.1415926 ......... Power (Numeric_Expr, Power Returns POWER Supreme RAND ([INT_EXPR]) Random number generator Round (NuMERIC_EXPR, INT_EXPR) An INT_EXPR specified in the precision round-entered SIGN (int_expr) according to positive, 0, negative, return 1, 0, -1 SQRT Float_expr) Square Root 3. Date Function getDate () Return Datename (DatePart, Date_EXPR) Return Name such as June Datepart (DatePart, Date_EXPR) Take a date Dated ITEDIFF (Date Part, date_expr1.dateexpr2) Date Dateadd (DatePart, Number, Date_EXPR) Return Date plus Number The above function DATEPART Writing Value and meaning yy 1753-9999 QQ 1-4 engraved mm 1-12 month DY 1-366 Day DD 1-31 WK 1-54 Week DW 1-7 Week HH 0-23 hours Mi 0-59 minutes SS 0-59 Second MS 0-999 millisecond Date Conversion Convert () 4. System Function SUSER_NAME () User Login User_name () User's Name User User in Database SHOW_ROLE () SHOW_ROLE () SHOW_NAME () Database Name COL_NAME (OBJ_ID) database object name COL_NAME (OBJ_ID) database object name COL_NAME (OBJ_ID) database object name COL_LENGTH ObjName, colname) Column Length Valid_name (char_expr) is a valid identifier