Insert Text Literal and Concatenation in Oracle SQL Vstavi besedilo dobesedno in Concatenation v Oracle SQL
In Oracle, it’s possible to insert literal or concatenate 2 or more charater strings or SQL result output together. V družbi Oracle, je mogoče vstaviti dobesedno ali Concatenate 2 ali več charater strune ali SQL Rezultati izhodno skupaj. This manipulation allows you to manipulate the format of data returned by SQL query. To vam omogoča, manipulacije vplivati na obliko podatkov, ki jih vrne SQL poizvedbo.
Two solid vertical bar || operator is used to concatenate 2 or more strings. Dve navpični vrstici trdnih | | subjekt, ki se uporabljajo za Concatenate 2 ali več nizov. 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. Poleg tega, Oracle določa tudi CONCAT značaja funkcijo, kot alternativo k navpični vrstici izvajalca le v primeru, obstajajo situacije, kjer je težko ali nemogoče nadzorovati prevod, ki jih izvajajo operacijski sistem ali mrežo javnih služb. This function should be used in applications that will be moved between environments with differing character sets. Ta funkcija je treba pri aplikacijah, ki bo premaknjen med okoljih z različnimi nabor znakov.
Oracle will automatically casts values into types which can be concatenated. Oracle se bo samodejno vzbuja vrednosti v vrste, ki se lahko ulančani. 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. Oracle kakor razlaga NULL, kakor je prazna (ničelna dolžina) niz znakov, da se ne vrne NULL, če operandove je NULL, pomen-concatenating ničelni niz znakov dolžine operandov, z drugo vedno rezultate v drugi operand, zato ničen lahko le rezultat od združevanje dveh nizov za nično. To concatenate an expression that might be null, use the NVL function to explicitly convert the expression to a zero-length string. Če želite Concatenate izraz, da bi se lahko ničen, uporabite funkcijo NVL izrecno pretvoriti izraz, da nič dolžina niza.
Concatenating two strings results in another character string. Concatenating dveh nizov rezultatov v drugi niz znakov. If both character strings are of datatype CHAR, the result has datatype CHAR and is limited to 2000 characters. Če se obe nizi znakov so datatype CHAR, rezultat je datatype CHAR in je omejena na 2000 znakov. If either string is of datatype VARCHAR2, the result has datatype VARCHAR2 and is limited to 4000 characters. Če katera koli niz je datatype VARCHAR2, rezultat je datatype VARCHAR2 in je omejena na 4000 znakov. Trailing blanks in character strings are preserved by concatenation, regardless of the strings’ datatypes. Zaključnimi praznimi nizi znakov, v kolikor so reprezentančne Povezana ga, ne glede na strune "datatypes.
For literal insertion, put the strings between the single quote ‘ in the SQL statement. Za dobesedno vnos, da se nizi med enojni narekovaj "na SQL izjavo.
Example and Usage : Primer in Navodila za uporabo:
SELECT ‘Name is ‘ || name FROM table; SELECT "Ime se" | | ime FROM tabela;
Name is whatever_name Ime je whatever_name
SELECT number || ‘ - ‘ || description FROM table ORDER BY number IZBERI število | | "-" | | opisu iz tabele Uredi po številu
1 - description 1 1 - opis 1
2 - description 2 2 - opis 2
Advance Usage : Vnaprej 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 je mogoče uporabljati vstavljanja Concatenation in Literal, da bi ustvarili niz SQL-poizvedba jezik samodejno, še posebej, če morate opraviti isti postopek za lote, sestavljene iz tabel, tj spustite veliko tabel. 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. Če želite to narediti, format podatkov SQL poizvedbo jezik za izhod poizvedbo veljaven rezultat v SQL format, in Namotaj SQL poizvedbo rezultatov v datoteko. Then execute the file that contains SQL statements. Nato se izvrši datoteko, ki vsebuje SQL izjave.
Example: Primer:
SELECT ‘DROP TYPE ‘ || type_name || ‘;’ SELECT "DROP TYPE" | | type_name | | ";"
will generates: bo ustvarja:
DROP TYPE type_name DROP TYPE type_name
that can be run at SQL*Plus by calling the file with @filename. da lahko zaženete v SQL * Plus, ki jo kliče datoteko z @ filename. All types that been selected from first SQL statements will be dropped from the database. Vse vrste, da je bil izbran iz prvega SQL izjav bo padel iz podatkovne baze.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. POMEMBNO: To je stroj prevede stran, ki je ponujena "kot je" brez garancije. Machine translation may be difficult to understand. Strojno prevajanje je lahko težko razumljiva. Please refer to Prosimo, glejte original English article Originalno angleško članek whenever possible. kadar je to mogoče.
Share and contribute or get technical support and help at Deliti in prispevati ali dobiti tehnično podporo in pomoč pri My Digital Life Forums Moje digitalno življenje Forumi .
Related Articles Sorodni članki
- Insert and Fill Random Filler Text and Lorem Ipsum Into Office Word, Execel and PowerPoint 2007 Vstavi in izpolnite Naključno besedilo, polnila in Lorem Ipsum v Office Word, Execel in PowerPoint 2007
- Download Free Ultra Hal Text-to-Speech Reader 1.0 for Convenient Text Reading Download Proste Ultra Hal Text-to-Speech Reader 1,0 Priročno Besedilo za branje
- Download Free Ease PDF to Text Extractor v1.10 to Convert PDF to Text Files in Bulk Brezplačno Prenesi PDF Enostavnost, da Besedilo Ekstraktor v1.10 na Pretvori Besedilne datoteke PDF na nepakiranih
- Text Snip Keeps Your Text and Codes Formatting Safe from IM and Email Besedilo Zrezek ohranja vaše besedilo in formatiranje kode varno od UI in E-pošta
- Add and Insert to Put Google AdSense Ads Units Between Blog Posts in Blogger.com Add in Insert, da se Google AdSense oglasi enot med blog objav v Blogger.com
- Insert Real Time Web Sites Into PowerPoint Presentation Slides With LiveWeb Vstavite v realnem času spletne strani v PowerPoint predstavitev diapozitivov z LiveWeb
- Check Oracle Version Preverite Oracle version
- Oracle Database Link Oracle Database Link
- Oracle JDeveloper Reviews Oracle JDeveloper pregledi
- IMP-00013 Oracle Import Error IMP-00013 Oracle Import Error


























March 2nd, 2007 21:57 2 mar 2007 21:57
Good article. Dober članek. Got what I was looking for… Imaš kaj sem iskal ...