----handling stringsSelect Left('abcdef',2)--from left to rightSelect Right('abcdef',2)--from right to leftSelect Lower('AVc')--Convert to lowercaseSelect Upper('ADSDF')--Convert to uppercasePrint Upper('ADSDF')--Convert to uppercaseSelect Len('Jahlsdakl')--returns the length of an int value stringSelect LTrim('a')--Remove left spaceSelect RTrim('a')--Remove Right spacePrint substring('aaaaaasssss',6,2)--The intercept string index starts at 1.Print Replace('ASDSDKULKHF',' as','GK')--(The target data source string, find which paragraph, replace it with what) the string length can be unequalPrint Replicate('a',5)--Copy the A 5 times .Print Str(123.456,5,1)--A decimal length of 5 decimal places is 1Print Space( -)--Print SpacePrint Patindex("',"')--The starting index of a string in another stringPrint Stuff('skahdjskld',4,2,'PPPPP')--insert ' PPPPP ' from fourth bit and delete back 2 bits starting from fourth bit----Type conversionPrint cast('123' as int)--Converting data typesPrint Convert(int,'123')--Converting data types----Mathematical functionsPrint ABS(- -)--take absolute valuePrint Ceiling(1.23)--ceiling, upper limitPrint Floor()--FlooringPrint Pi()--PiPrint Rand()--Random numberPrint round(3.1415926,3)--RoundingPrint sqrt()--RadicalsPrint Square()--Square
Some functions of SQL Server are Note 5