English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

to my knowledge the general sql language for a select statement is "SELECT A,B,C FROM TABLE". but i came across a select statement in which they have used the character "|" instead of comma(,).i.e., select a"|"b"|"c"|" from table. what kind of language is this? is it correct? please explain me in detail

2006-08-20 23:55:21 · 3 answers · asked by kanna 3 in Computers & Internet Programming & Design

3 answers

Someone wanted the output of a select statement to have a pipe ('|') inbetween the columns like this:

a|b|c|d

I've done that to create a file that has '|' as a delimeter rather than a comma ','.

Also, Oracle uses '|' as a concat character. example:

SELECT firstname || ' ' || lastname AS fullname, address1, address2, city, state, zip

result:
joe smith, 323 main, apt 3, memphis, tn, 39939

2006-08-21 00:10:47 · answer #1 · answered by rkalch 2 · 0 1

SQL is a structured query language.. there are many implementations, MySQL is the most common, and the one being nearest to standart SQL, then there is PostSQL etc...

2006-08-21 06:59:42 · answer #2 · answered by cyngus65 3 · 0 1

dear execute the following query it will helps you to undersatnd
i have use table name tbl_employee and use a alisa "a" and coloum name after select key word


select a.Employee_Id +'|'+ a.Employee_Name +'|'+ a.Employee_Adress +'|' from tbl_Employee a

2006-08-21 07:10:04 · answer #3 · answered by kartoos5050 2 · 1 0

fedest.com, questions and answers