How to intercept the first few bits of a string in sql
Editor to share with you how to intercept the first few strings in sql. I hope you will get something after reading this article. Let's discuss it together.
Sql intercepts the first few bits of a string
In sql, you can fetch the first few bits of a string by using the LEFT function.
LEFT (c, number_of_char) is used to return the left part of a requested text field, where c represents the requested text field and number_of_cha represents the number of string digits to be fetched. For example, "LEFT (" www.php.cn ", 3)" can get the string "www".
Extended data:
In sql, common functions are described as follows:
1. AVG (): returns the average value
2. COUNT (): returns the number of rows
3. FIRST (): returns the value of the first record
4. LAST (): returns the value of the last record
5. MAX (): returns the maximum value
6. MIN (): returns the minimum value
7. SUM (): returns the sum
8. UCASE (): converts a field to uppercase
9. LCASE (): converts a field to lowercase
10. MID (): extract characters from a text field
11. LEN (): returns the length of a text field
12. ROUND (): rounds a numeric field to the specified number of decimal places
13. NOW (): returns the current system date and time
14. FORMAT (): formats how a field is displayed
15. INSTR (): returns the numeric position of the specified character in a text field
16. LEFT (): returns the left part of a requested text field
17. RIGHT (): returns the right side of a requested text field
After reading this article, I believe you have a certain understanding of "how to intercept the first few strings in sql". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!