Remove or Trim First or Last Few Characters in MySQL Database with SQL निकालें या छाँटो पहले या अंतिम एसक्यूएल के साथ MySQL डाटाबेस में कुछ वर्ण
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. MySQL डाटाबेस में एक और उपयोगी स्ट्रिंग समारोह TRIM है (), जो प्रमुख मिलान या पीछे चल अक्षर को हटाने के बाद एक पाठ स्ट्रिंग वापस भी उपसर्ग या प्रत्यय के रूप में जाना होगा. It's been described by MySQL reference as function that returns the string str with all remstr prefixes or suffixes removed. हटाया यह समारोह के रूप में MySQL संदर्भ है कि लाभ सभी remstr उपसर्ग या प्रत्यय के साथ str स्ट्रिंग द्वारा बताया गया है. If none of the specifiers BOTH, LEADING, or TRAILING is given, BOTH is assumed. यदि specifiers दोनों, प्रमुख, या पीछे चल दिया जाता है, दोनों में से कोई भी माना जाता है. remstr is optional and, if not specified, spaces are removed. remstr वैकल्पिक और है, नहीं तो निर्दिष्ट, रिक्त स्थान को हटा रहे हैं.
Syntax of TRIM(): TRIM के सिंटेक्स ():
TRIM([{BOTH | LEADING | TRAILING} [remstr] FROM] str), TRIM([remstr FROM] str) TRIM ([(| अग्रणी | पीछे चल) [remstr] से] str), TRIM (remstr [से] str दोनों)
For example: उदाहरण के लिए:
SELECT TRIM(' bar '); का चयन करें TRIM (पट्टी ');
will return 'bar' (spaces dropped). 'लौट बार' रिक्त स्थान (छोड़) होगा.
SELECT TRIM(LEADING 'x' FROM 'xxxbarxxx'); का चयन करें TRIM ( 'अग्रणी एक्स' से xxxbarxxx ');
will return 'barxxx' (only leading x characters is removed). 'लौट barxxx होगा' (केवल प्रमुख x अक्षर) निकाल दिया जाता है.
SELECT TRIM(BOTH 'x' FROM 'xxxbarxxx'); का चयन करें TRIM (x '' दोनों 'से xxxbarxxx');
will return 'bar' (leading and trailing xs is dropped). 'लौट बार' (और अग्रणी होगा xs पीछे छोड़ दिया है).
SELECT TRIM(TRAILING 'xyz' FROM 'barxxyz'); का चयन करें TRIM ( 'पीछे' xyz 'से barxxyz');
will return 'barx' (trailing xyz is cleared). 'लौट barx होगा' (पीछे चल xyz को मंजूरी दे दी है).
This function is multi-byte safe. इस समारोह में बहु बाइट सुरक्षित है. 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. और यह भी अन्य एसक्यूएल कमांड के साथ प्रयोग किया जा सकता, जैसे अद्यतन संशोधन का अद्यतन करने के लिए सीधे एसक्यूएल जैसे phpMyAdmin के रूप में उपकरण का उपयोग बयान के साथ डेटाबेस तालिका डेटा पर है.
IMPORTANT : The page is machine translated and provided "as is" without warranty. महत्वपूर्ण: पृष्ठ की मशीन है और अनुवाद प्रदान "के रूप में वारंटी के बिना है." Machine translation may be difficult to understand. मशीन अनुवाद मुश्किल से समझ सकते हो. Please refer to कृपया उल्लेख करने original English article मूल अंग्रेजी लेख whenever possible. जब भी संभव है.
Related Articles संबंधित लेख
- How to Find and Replace Text in MySQL Database using SQL कैसे को ढूँढें और बदलें पाठ MySQL डाटाबेस में एसक्यूएल प्रयोग
- Check and Optimize MySQL Database Automatically with Crontab/Cron जाँच करें और अनुकूलन MySQL Crontab के साथ स्वत: डाटाबेस / Cron
- MySQL Database Performance Tuning Best Practices Video Tutorial MySQL डाटाबेस के प्रदर्शन ट्यूनिंग उत्तम आचरण वीडियो ट्यूटोरियल
- Enable Logging of Slow Queries (Slow Query Log) in MySQL Database सक्षम MySQL में धीरे प्रश्न (धीरे क्वेरी लॉग इन करें) का डाटाबेस लॉग इन
- How to Remove and Drop Datafiles from Tablespace in Oracle Database तालिकास्थान से Oracle डाटाबेस में निकालें और गिरा Datafiles कैसे
- Uninstall and Remove Multiple Database Instances of Microsoft SQL Server 2005 स्थापना रद्द करें और निकालें एकाधिक डेटाबेस Microsoft SQL सर्वर 2005 के उदाहरण
- How to Escape Characters in Oracle PL/SQL Queries कैसे Oracle पी एल / SQL प्रश्न में वर्ण बचने के लिए
- Change and Reset MySQL root Password परिवर्तन और रीसेट MySQL रूट पासवर्ड
- Change or Set MySQL Long Query Time Value for log-slow-queries बदलें या सेट MySQL लांग क्वेरी समय मान लॉगइन धीमी लिए प्रश्नों
- WordPress MySQL SQL Query Error in WPDB Class WordPress MySQL SQL क्वेरी WPDB में त्रुटि कक्षा









































