Insert Text Literal and Concatenation in Oracle SQL يدرج النص الحرفي ومزود أوراكل في السلسلة
In Oracle, it’s possible to insert literal or concatenate 2 or more charater strings or SQL result output together. في أوراكل ، فمن الممكن أن تضاف الحرفي أو سلسل 2 أو أكثر charater الجمل أو مزود نتيجة الانتاج معا. This manipulation allows you to manipulate the format of data returned by SQL query. يتيح لك هذا التلاعب التلاعب شكل من البيانات وعاد بها مزود استفسار.
Two solid vertical bar || operator is used to concatenate 2 or more strings. اثنان الصلبة العمودية | | مشغل تستخدم لسلسل 2 أو أكثر من الجمل. Beside, Oracle also provides the CONCAT character function as an alternative to the vertical bar operator just in case there is situation where it is difficult or impossible to control translation performed by operating system or network utilities. الى جانب ، كما يوفر أوراكل CONCAT طابع وظيفة كبديل لالعمودية المشغل فقط في حالة وجود حالة حيث يصعب أو يستحيل التحكم فيها الترجمة التي يقوم بها نظام التشغيل أو شبكة المرافق. This function should be used in applications that will be moved between environments with differing character sets. هذه المهمة ينبغي أن تستخدم في التطبيقات التي سوف تنقل بين البيئات المختلفة مع مجموعات الأحرف.
Oracle will automatically casts values into types which can be concatenated. وسوف يلقي أوراكل تلقائيا إلى أنواع القيم التي يمكن concatenated. As Oracle interprets NULL as the empty (zero-length) character string, it doesn’t return NULL if an operand is NULL, meaning concatenating a zero-length character string with another operand always results in the other operand, so null can result only from the concatenation of two null strings. كما تفسر أوراكل NULL كما الفارغة (الصفر طول) سلسلة الطابع ، لا عودة NULL إذا كان عليه العملية لاغيا ، معنى السلسلة الصفر طول سلسلة طابع العملية الرياضية دائما مع آخر النتائج في العملية الرياضية الأخرى ، حتى يمكن أن يؤدي إلا لاغية من السلسلة اثنين من الجمل لاغية. To concatenate an expression that might be null, use the NVL function to explicitly convert the expression to a zero-length string. لسلسل تعبير عن التي قد تكون لاغية ، واستخدام NVL وظيفة لتحويل التعبير صراحة إلى الصفر طول سلسلة.
Concatenating two strings results in another character string. السلسلة اثنين من الجمل النتائج في آخر سلسلة الطابع. If both character strings are of datatype CHAR, the result has datatype CHAR and is limited to 2000 characters. إذا كان كل من الطابع الجمل هي من نوع البيانات شار ، فإن النتيجة قد تشار نوع البيانات ويقتصر على 2000 حرفا. If either string is of datatype VARCHAR2, the result has datatype VARCHAR2 and is limited to 4000 characters. إما إذا كان هو من نوع البيانات سلسلة VARCHAR2 ، النتيجة ونوع البيانات VARCHAR2 يقتصر على 4000 حرفا. Trailing blanks in character strings are preserved by concatenation, regardless of the strings’ datatypes. تأتي متأخرة عن الفراغات في الجمل هي الحفاظ على الطابع جانب السلسلة ، بغض النظر عن الجمل 'أنواع البيانات.
For literal insertion, put the strings between the single quote ‘ in the SQL statement. لإدراج الحرفي ، وضعت بين الاوتار واحد اقتبس 'في بيان مزود.
Example and Usage : ومثال ذلك الاستخدام :
SELECT ‘Name is ‘ || name FROM table; اختر 'هو الاسم' | | الاسم من الجدول ؛
Name is whatever_name الاسم هو whatever_name
SELECT number || ‘ - ‘ || description FROM table ORDER BY number اختر عدد | | '--' | | وصف من الجدول ترتيب حسب عدد
1 - description 1 1 -- وصف 1
2 - description 2 2 -- وصف 2
Advance Usage : مقدما الاستخدام :
It’s possible to use Concatenation and Literal Insertion to generate a set of SQL query language automatically, especially when need to perform same operation to lots of tables, ie dropping a lot of tables. ومن الممكن لاستخدام السلسلة وحرفي الإدراج لتوليد مجموعة من مزود استفسار اللغة تلقائيا ، لا سيما عندما الحاجة لأداء نفس العملية إلى الكثير من الجداول ، أي إسقاط الكثير من الجداول. To do this, format the SQL data query language to output the query result in valid SQL format, and spool the SQL query results to a file. لذلك ، فإن الشكل مزود بيانات الناتج للغة استفسار استفسار نتيجة صحيحة في الشكل مزود ، ومزود بكرة فإن نتائج البحث إلى ملف. Then execute the file that contains SQL statements. ثم تنفيذ الملف الذي يحتوي على مزود بيانات.
Example: على سبيل المثال :
SELECT ‘DROP TYPE ‘ || type_name || ‘;’ اختر 'إسقاط اكتب' | | type_name | | '؛'
will generates: سوف يولد :
DROP TYPE type_name إسقاط من النوع type_name
that can be run at SQL*Plus by calling the file with @filename. التي يمكن أن تديرها في مزود * زائد بالدعوة @ الملف مع اسم الملف. All types that been selected from first SQL statements will be dropped from the database. جميع أنواع أن تم اختيار من أول مزود بيانات سيكون انخفض من قاعدة البيانات.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. هام : هذه هي آلة الصفحة المترجمة التي تقدم "كما هي" دون ضمان. Machine translation may be difficult to understand. الترجمة الآلية قد يكون من الصعب فهم. Please refer to يرجى الرجوع إلى original English article المادة الانكليزية الأصلية whenever possible. كلما كان ذلك ممكنا.
Share and contribute or get technical support and help at وحصة المساهمة أو الحصول على الدعم التقني والمساعدة في My Digital Life Forums بلادي الرقمي الحياة المنتديات .
Related Articles المواد ذات الصلة
- Insert and Fill Random Filler Text and Lorem Ipsum Into Office Word, Execel and PowerPoint 2007 ويضاف ملء عشوائية وحشو النص Lorem Ipsum في مكتب كلمة ، Execel وPowerPoint 2007
- Download Free Ultra Hal Text-to-Speech Reader 1.0 for Convenient Text Reading تنزيل الحرة الترا هال النصوص إلى كلام مسموع 1.0 تيسيرا للقارئ نص ريدينج
- Download Free Ease PDF to Text Extractor v1.10 to Convert PDF to Text Files in Bulk تنزيل الحرة سهولة قوات الدفاع الشعبي إلى نص النازع v1.10 لتحويل قوات الدفاع الشعبي إلى ملفات نصية في السائبة
- Add and Insert to Put Google AdSense Ads Units Between Blog Posts in Blogger.com وتضيف تضاف الى وضع وحدات إعلانات جوجل AdSense بين بلوق وظائف في Blogger.com
- Insert Real Time Web Sites Into PowerPoint Presentation Slides With LiveWeb تضاف الوقت الحقيقي المواقع على شبكة الإنترنت إلى PowerPoint عرض الشرائح مع LiveWeb
- Check Oracle Version التحقق من النسخة أوراكل
- Oracle Database Link ربط قاعدة بيانات أوراكل
- Oracle JDeveloper Reviews أوراكل JDeveloper الاستعراضات
- IMP-00013 Oracle Import Error الوجود العسكري الدولي - 00013 أوراكل الاستيراد خطأ
- How to Escape Characters in Oracle PL/SQL Queries كيف الفرار حرفا في أوراكل رر / مزود الاستفسارات

































March 2nd, 2007 21:57 مارس 2nd ، 2007 21:57
Good article. المادة جيدة. Got what I was looking for… حصلت على ما ظللت أبحث عنه...