Insert Text Literal and Concatenation in Oracle SQL Εισαγωγή κειμένου σε γραμματική και αληλουχία Oracle SQL

In Oracle, it’s possible to insert literal or concatenate 2 or more charater strings or SQL result output together. Στην Oracle, είναι πιθανό να προστεθεί κυριολεκτική ή ενώσετε 2 ή περισσότερα charater strings SQL ή αποτέλεσμα την παραγωγή μαζί. This manipulation allows you to manipulate the format of data returned by SQL query. Αυτή η χειραγώγηση σας επιτρέπει να χειραγωγήσει τη μορφή των δεδομένων που επιστρέφονται από την 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. Δίπλα, η Oracle παρέχει επίσης την 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. Oracle αυτόματα θα ρίχνει τιμές σε είδη που μπορούν να συννενωθούν. 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 ως Μαντείο ερμηνεύει το άδειο (μηδενικού μήκους) string χαρακτήρα, δεν επιστρέφει NULL αν τελεστού είναι NULL, έννοια concatenating μηδενικό μήκος χαρακτήρων που με άλλο τελεστή πάντοτε την άλλη τελεστή, οπότε μπορεί να οδηγήσει μόνο null από την Επί δύο null strings. 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. Concatenating δύο strings αποτελέσματα σε άλλο χαρακτήρα string. If both character strings are of datatype CHAR, the result has datatype CHAR and is limited to 2000 characters. Αν και οι δύο χαρακτήρων είναι CHAR των δεδομένων, το αποτέλεσμα έχει τα δεδομένα CHAR και περιορίζεται σε 2000 χαρακτήρες. If either string is of datatype VARCHAR2, the result has datatype VARCHAR2 and is limited to 4000 characters. Αν ένα string είναι VARCHAR2 των δεδομένων, το αποτέλεσμα έχει και η VARCHAR2 δεδομένων περιορίζεται σε 4000 χαρακτήρες. Trailing blanks in character strings are preserved by concatenation, regardless of the strings’ datatypes. Καταληκτικά κενά στην χαρακτήρων είναι διατηρημένα με αληλουχία, ανεξάρτητα από το strings "δεδομένων.

For literal insertion, put the strings between the single quote ‘ in the SQL statement. Για προσθήκη γραμματική, που οι χορδές μεταξύ η μόνη προσφορά »στην πρόταση SQL.

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 : Advance Χρήση:

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. Είναι δυνατόν να χρησιμοποιηθούν και κατά γράμμα Επί Παρεμβολή να δημιουργήσει ένα σύνολο SQL query γλώσσα αυτόματα, ειδικά όταν χρειαστεί να κάνει για την ίδια τη λειτουργία των τμημάτων των πινάκων, δηλαδή πτώση πολλά τραπέζια. 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. Για να γίνει αυτό, η μορφή των δεδομένων SQL query γλώσσα για την έξοδο των αιτημάτων έχει ως αποτέλεσμα έγκυρο SQL μορφή, και η ουρά του SQL query αποτελέσματα σε ένα αρχείο. Then execute the file that contains SQL statements. Στη συνέχεια εκτελούν το αρχείο που περιέχει δηλώσεις SQL.

Example: Παράδειγμα:

SELECT ‘DROP TYPE ‘ || type_name || ‘;’ Επιλέξτε 'DROP ΤΥΠΟΥ "| | type_name | |"? "

will generates: θα δημιουργεί:

DROP TYPE type_name DROP ΤΥΠΟΥ type_name

that can be run at SQL*Plus by calling the file with @filename. ότι μπορεί να εκτελεστεί σε SQL * Plus, καλώντας το αρχείο με όνομα αρχείου @. All types that been selected from first SQL statements will be dropped from the database. Όλα τα είδη που επιλέχθηκαν από την πρώτη SQL δηλώσεις θα πέσει από τη βάση δεδομένων.

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 Η ψηφιακή ζωή φόρουμ .



One Response to “Insert Text Literal and Concatenation in Oracle SQL” Μια απάντηση σε "Εισαγωγή Κείμενο Επί γράμμα και στο Oracle SQL"

  1. Arun
    March 2nd, 2007 21:57 2 Μαρ, 2007 21:57
    1

    Good article. Καλό το άρθρο. Got what I was looking for… Το βρήκα αυτό που έψαχνα ...

Leave a Reply Αφήστε μια απάντηση

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Μπορείτε να χρησιμοποιήσετε αυτές τις ετικέτες: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del DATETIME = ""> <em> <i> <q Cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Εγγραφείτε σε σχόλια η δυνατότητα έχει απενεργοποιηθεί. To receive notification of latest comments posted, subscribe to Για να λάβετε κοινοποίηση των αποσπασμένων τελευταίες παρατηρήσεις, να εγγραφείτε My Digital Life Comments RSS feed My Digital Life Σχόλια RSS feed or ή register to receive εγγραφείτε για να λαμβάνετε new comments in daily email digest. νέα σχόλια στον ημερήσιο email χωνέψει.
Custom Search

New Articles Νέα άρθρα

Incoming Search Terms for the Article Incoming Search Όροι για το άρθρο

oracle concatenation Oracle αληλουχία - -- Concatenation in Oracle Επί στην Oracle - -- concat sqlplus concat sqlplus - -- oracle concat string Oracle concat string - -- oracle sql concatenate Oracle SQL ενώσετε - -- concatenation oracle αληλουχία Oracle - -- concat oracle sql concat Oracle SQL - -- insert & in oracle & Εισαγωγή στην Oracle - -- oracle concat Oracle concat - -- SQL SELECT literal SQL SELECT γραμματική - -- sqlplus concatenate sqlplus ενώσετε - -- concat char oracle concat char Oracle - -- concatenation in oracle sql αληλουχία στο Oracle SQL - -- concat integer with string in sql oracle concat ακέραιος με string σε SQL Oracle - -- concatenate strings with select in oracle strings επιλέξτε ενώσετε με το μαντείο - -- concatenate sql oracle ενώσετε SQL Oracle - -- concatenate in sql oracle ενώσετε σε SQL Oracle - -- concatination of strings in sql insert queries concatination των strings στο ένθετο SQL ερωτήματα - -- concat oracle concat Oracle - -- concatenate query in oracle ενώσετε ερώτημα σε Oracle - -- concatenando query oracle concatenando ερώτημα Oracle - -- concatenate string sql statement ενώσετε συμβολοσειρά SQL δήλωση - -- concatenar & oracle sql plus concatenar & Oracle SQL συν - -- insert between a string oracle sql παρεμβάλλεται μεταξύ ενός string Oracle SQL - -- last character from sql string in oracle τελευταίο χαρακτήρα από string σε SQL Oracle - -- oracle insert Oracle ένθετο - -- oracle concatenate sql string then execute Oracle SQL ενώσετε συμβολοσειρά τότε εκτελέσει - -- oracle select statement concatenate strings Oracle επιλέξτε δήλωση ενώσετε strings - -- oracle sql escape translate Oracle SQL διαφυγής μεταφράσει - -- oracle select concatenate Oracle επιλέξτε ενώσετε - -- oracle insert string Oracle ένθετο string - -- oracle Concatenate Examples Oracle CONCATENATE Παραδείγματα - -- oracle insert character in string Oracle εισαγάγετε χαρακτήρα σε string - -- oracle query concatenate Oracle ερώτημα ενώσετε - -- ORACLE SQL Concatenation Oracle SQL αληλουχία - -- oracle sql "order by number" Oracle SQL "ώστε σε αριθμό" - -- oracle concatenating strings Oracle concatenating strings - -- sql select literal example SQL επιλέξτε κυριολεκτική παράδειγμα - -- sql literal SQL γραμματική - -- sql concatenate query ενώσετε SQL query - -- sql text oracle concatenate Oracle SQL κείμενο ενώσετε - -- sql oracle query literal Oracle SQL query literal - -- string concatenation in sql string αληλουχία σε SQL - -- string concatenation on an insert string αληλουχία για μια προσθήκη - -- string concatenation in batch file string παρτίδα στο αρχείο αληλουχία - -- text in oracle select κείμενο στο μαντείο επιλέξτε - -- "insérer texte dans query sql" "insérer κείμενο dans SQL query" - -- concatenation operator for querying text files αληλουχία φορέα των διερευνήσεων για αρχεία κειμένου - -- concatenate select oracle ενώσετε επιλέξτε Oracle - -- concatenation of string in oracle Επί του string σε Oracle - --