Insert Text Literal and Concatenation in Oracle SQL Umetnite tekst slovni i lanac u Oracle SQL
In Oracle, it’s possible to insert literal or concatenate 2 or more charater strings or SQL result output together. U Oracle, moguće je da ubacite doslovan ili spojite 2 ili više charater žice ili SQL rezultat izlaz zajedno. This manipulation allows you to manipulate the format of data returned by SQL query. To vam omogućuje da manipulacija manipuliranje format podataka vratio po SQL upit.
Two solid vertical bar || operator is used to concatenate 2 or more strings. Dvije čvrste okomitu traku | | operator se koristi za spojite 2 ili više stringova. 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. Osim, Oracle također pruža CONCAT karakter funkcija kao alternativa na okomitu traku operatera samo u slučaju da postoji situacija gdje je teško ili nemoguće kontrolirati prijevod u izvedbi operacijskog sustava ili mreže alate. This function should be used in applications that will be moved between environments with differing character sets. Ova funkcija treba koristiti u aplikacijama koje će biti premještena među sredinama s različite karakter setove.
Oracle will automatically casts values into types which can be concatenated. Oracle će automatski baca vrijednosti u vrste koje se mogu 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. Kao Oracle NULL tumači kao prazan (bez dužina) niz znakova, to ne vratiti NULL ako je operand je NULL, što znači concatenating nulte duljine niza znakova s drugim operand uvijek rezultate u drugim operand, pa null može rezultirati samo lanac od dva nul žice. To concatenate an expression that might be null, use the NVL function to explicitly convert the expression to a zero-length string. Za spojite izraz koji može biti nula, koristite funkciju NVL izričito pretvoriti u izraz za niz duljine nula.
Concatenating two strings results in another character string. Concatenating dvije žice rezultate u drugi niz znakova. If both character strings are of datatype CHAR, the result has datatype CHAR and is limited to 2000 characters. Ako su obje znak žice su od datatype char, rezultat je datatype char i ograničen je na 2000 znakova. If either string is of datatype VARCHAR2, the result has datatype VARCHAR2 and is limited to 4000 characters. Ako bilo je niz od datatype VARCHAR2, rezultat je datatype VARCHAR2 i ograničen je na 4000 znakova. Trailing blanks in character strings are preserved by concatenation, regardless of the strings’ datatypes. Vučeni praznine u znak žice koje su sačuvane u lanac, bez obzira na žice 'datatypes.
For literal insertion, put the strings between the single quote ‘ in the SQL statement. Za umetanje slova, stavi žice između jednog citat "u SQL izjavu.
Example and Usage : Primjeri i upotreba:
SELECT ‘Name is ‘ || name FROM table; Odaberite "Ime je '| | ime iz tablice;
Name is whatever_name Ime je whatever_name
SELECT number || ‘ - ‘ || description FROM table ORDER BY number SELECT broj | | '-' | | opis OD sortirano prema tablici broj
1 - description 1 1 - 1 opis
2 - description 2 2 - opis 2
Advance Usage : Advance Upotreba:
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 moguće koristiti Concatenation i dosljedan Ubacivanje generirati skup SQL upitni jezik automatski, posebno kada je potrebno izvršiti isti rad na puno stolova, tj. pada puno stolova. 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. Da biste to učinili, format podataka SQL upitni jezik da ispiše rezultat na upit u SQL valjani oblik, i bobina SQL upit rezultate u datoteku. Then execute the file that contains SQL statements. Onda izvršiti datoteku koja sadrži SQL izjave.
Example: Primjer:
SELECT ‘DROP TYPE ‘ || type_name || ‘;’ SELECT 'drop VRSTA' | | type_name | | ";"
will generates: će se generira:
DROP TYPE type_name Drop VRSTA type_name
that can be run at SQL*Plus by calling the file with @filename. koji se mogu izvoditi na SQL * Plus pozivom datoteku s @ filename. All types that been selected from first SQL statements will be dropped from the database. Svi tipovi koji su odabrani od prvih SQL izjava bit će odbačene iz baze podataka.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. VAŽNO: Ovaj je stroj prevedeno stranica što je određeno "kako jest" bez jamstava. Machine translation may be difficult to understand. Strojno prevođenje svibanj biti teško za razumjeti. Please refer to Molimo pogledajte original English article original English članak whenever possible. kad god je to moguće.
Share and contribute or get technical support and help at Dionički i doprinose ili dobiti tehničku podršku i pomoć u My Digital Life Forums Moj digitalni život forumi .
Related Articles Povezani članci
- Insert and Fill Random Filler Text and Lorem Ipsum Into Office Word, Execel and PowerPoint 2007 Umetnite i napunite slučajnih popunjavanje teksta i Lorem Ipsum u Office Word, Execel i PowerPointa 2007
- Download Free Ultra Hal Text-to-Speech Reader 1.0 for Convenient Text Reading Download Free Ultra Hal Text-to-Speech Reader 1.0 za Podesni Tekst Čitanje
- Download Free Ease PDF to Text Extractor v1.10 to Convert PDF to Text Files in Bulk Download Free PDF Jednostavnost teksta izvlači na v1.10 za Pretvori u PDF formatu za Tekst datoteka skupno
- Add and Insert to Put Google AdSense Ads Units Between Blog Posts in Blogger.com Dodati i Umetnuti staviti Google AdSense oglasi jedinica između blogu u Blogger.com
- Insert Real Time Web Sites Into PowerPoint Presentation Slides With LiveWeb Ubacite u stvarnom vremenu web-mjesta u programu PowerPoint prezentacija sa slajdovima LiveWeb
- Check Oracle Version Provjerite Oracle version
- Oracle Database Link Oracle baza podataka link
- Oracle JDeveloper Reviews Oracle JDeveloper Recenzije
- IMP-00013 Oracle Import Error IMP-00013 Oracle Uvoz Greška
- How to Escape Characters in Oracle PL/SQL Queries Kako pobjeći znakova u Oracle PL / SQL upitima


























March 2nd, 2007 21:57 2. ožujak 2007 21:57
Good article. Dobar članak. Got what I was looking for… Imaš što sam bio u potrazi za ...