-Mathematical functions
--abs Absolute Value
Select ABS (-7)
--ceiling Take the line
Select CEILING (3.14)
--Floor Remove line
Select Floor (4.14)
--power several parties
Select (2,3)
--round rounded integer part is odd even, fractional part. 5 is different.
Select Round (4.5,0)
--sqrt Open Square
Select sqrt (4)
--square Square
Select Square (2)
--String function
--ascii the ASCII code that returns the leftmost character of the string
Select ASCII (' name ')
Select ASCII (name) from biao--to view the ASCII code for the first character of the owner's name
--char convert ASCII code to characters
Select CHAR (70)
Select CHAR (Yuwen) from biao--converts all language fractions to acsii yards
--Note: (Must be an integer) the converted expression or constant needs to be between 0-255 and out of the output null
--len returns the length of the string
Select LEN (' ABCDEFG ')
Select LEN (name) from biao--displays the length of the name
--charindex returns a string of characters that appear in a string from the beginning to a few indexes
Select CHARINDEX (' EFG ', ' ABCDEFG ')--index starting at 1, if the return value is 0, indicates no
Select CHARINDEX (' 1993 ', birth) from studes--view in birthdays the index does not return a value of 0
--left means the string is truncated from the left
Select Left (' Abcdefgh ', 5)
--right to intercept the string from the right
Select Right (' Abcdefgh ', 5)
--lower Convert all to lowercase
Select lower (' Afagaag ')
--upper all converted to uppercase
Select Upper (' Afagaag ')
--ltrim Remove the left space
Select LTrim (' Aiiiji ')
--rtrim Remove the right space
Select RTrim (' Afjasjfioji ')
--patindex equivalent to Charindex returns the index bit of the first character in the string where the word string is located
Select Patindex ('%ghih% ', ' Kfjakjfajghihfiaosjfio ')
--replace Find and replace changes that do not make data just display the changes
Select replace (Sex, ' female ', ' girl ') from Studes
--replicate Copy and paste
Select Replicate (' ABC ', 3)
--reverse Flip
Select reverse (' AFAFAEFAEGEWG ')
--space spaces
Select ' A ' + space (+ ' AB ')
--STR cast to String
Select STR (222.2223,4,5)
--stuff
Select Stuff (' ADSFAF ', 4,2, ' RG ')
--substring intercepted string
Select substring (' Khdiofhiga ', 3,4)
Group BY is a grouping, used primarily for statistics, totals, and so on in SQL
Having is the condition
Order BY is sorted by what field, in order or in reverse.
In group BY, you can use the order by
Use order: GROUP by has order by
SQL math functions