Remove or Trim First or Last Few Characters in MySQL Database with SQL Verwijderen of Trim eerste of laatste karakters in MySQL-database met SQL
Another useful string function in MySQL database is TRIM() which will return a text string after removing the matching leading or trailing characters, also known as prefixes or suffixes. Een andere nuttige functie string in MySQL-database is TRIM (), die zal terugkeren een tekenreeks na het verwijderen van de matching leidende of volgnullen karakters, ook wel bekend als kengetallen of achtervoegsels. It’s been described by MySQL reference as function that returns the string str with all remstr prefixes or suffixes removed. Het is al beschreven door MySQL referentiepunt als functie die retourneert de string str met alle remstr kengetallen of achtervoegsels verwijderd. If none of the specifiers BOTH, LEADING, or TRAILING is given, BOTH is assumed. Als geen van de voorschrijvers beide, LEIDEN, of TRAILING wordt gegeven, ZOWEL wordt verondersteld. remstr is optional and, if not specified, spaces are removed. remstr is facultatief en wanneer niet wordt opgegeven, spaties worden verwijderd.
Syntax of TRIM(): Syntaxis van TRIM ():
TRIM([{BOTH | LEADING | TRAILING} [remstr] FROM] str), TRIM([remstr FROM] str) TRIM ([(BOTH | LEIDEN | TRAILING) [remstr] UIT] str) TRIM ([remstr UIT] str)
For example: Bijvoorbeeld:
SELECT TRIM(’ bar ‘); SELECT TRIM ( 'bar');
will return ‘bar’ (spaces dropped). zal terugkeren 'bar' (plaatsen gedaald).
SELECT TRIM(LEADING ‘x’ FROM ‘xxxbarxxx’); SELECT TRIM (LEIDEN 'x' UIT 'xxxbarxxx');
will return ‘barxxx’ (only leading x characters is removed). zal terugkeren 'barxxx' (alleen leidende x karakters wordt verwijderd).
SELECT TRIM(BOTH ‘x’ FROM ‘xxxbarxxx’); SELECT TRIM (BOTH 'x' UIT 'xxxbarxxx');
will return ‘bar’ (leading and trailing xs is dropped). zal terugkeren 'bar' (voorrand en xs is gedaald).
SELECT TRIM(TRAILING ‘xyz’ FROM ‘barxxyz’); SELECT TRIM (TRAILING 'xyz' UIT 'barxxyz');
will return ‘barx’ (trailing xyz is cleared). zal terugkeren 'barx "(sleep-xyz wordt gewist).
This function is multi-byte safe. Deze functie is multi-byte veilig. And it can also be used with other SQL command such as UPDATE to perform modification update directly on database table data with SQL statements using tool such as phpMyAdmin. En het kan ook gebruikt worden met andere SQL-commando, zoals het uitvoeren van UPDATE wijziging update rechtstreeks op database tabel gegevens met behulp van SQL statements gebruiken, zoals phpMyAdmin.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. BELANGRIJK: Dit is een machine vertaalde pagina die wordt verstrekt "as is" zonder garantie. Machine translation may be difficult to understand. Machine vertaling wellicht moeilijk te begrijpen. Please refer to Raadpleeg original English article origineel Engels artikel whenever possible. als dat mogelijk is.
Share and contribute or get technical support and help at Aandeel en bijdragen of het vinden van technische ondersteuning en hulp bij My Digital Life Forums My Digital Life Forums .
Related Articles Gerelateerde artikelen
- How to Find and Replace Text in MySQL Database using SQL Hoe te zoeken en Vervang tekst in de MySQL-database via SQL
- Check and Optimize MySQL Database Automatically with Crontab/Cron Check en optimaliseren van de MySQL database automatisch met crontab / Cron
- MySQL Database Performance Tuning Best Practices Video Tutorial MySQL database performance tuning Best Practices Video Tutorial
- Enable Logging of Slow Queries (Slow Query Log) in MySQL Database Logboekregistratie inschakelen van Slow zoekopdrachten (Slow Query Log) in MySQL database
- How to Remove and Drop Datafiles from Tablespace in Oracle Database Hoe te verwijderen en Drop Datafiles uit tablespace in Oracle Database
- Uninstall and Remove Multiple Database Instances of Microsoft SQL Server 2005 Verwijderen en verwijder database meerdere exemplaren van Microsoft SQL Server 2005
- Oracle Database Link Oracle Database koppeling
- How to Escape Characters in Oracle PL/SQL Queries How to escape-tekens in Oracle PL / SQL queries
- Oracle EXP-00091 Error When Export Database Oracle EXP-00091 fout, toen de uitvoer database
- Change Oracle Database User Password Change Oracle database-gebruiker wachtwoord

























