Re: What is || doing
От | Thom Brown |
---|---|
Тема | Re: What is || doing |
Дата | |
Msg-id | BANLkTiksAZGbx5_11_aNEKz6H_gjyZBVpw@mail.gmail.com обсуждение исходный текст |
Ответ на | What is || doing (Frank Lanitz <frank@frank.uvena.de>) |
Список | pgsql-novice |
On 27 June 2011 13:59, Frank Lanitz <frank@frank.uvena.de> wrote: > Hi list, > > I've got an query which contains || inside the select statement and I'm > not sure, what this is doing. Can you help me out a bit or send me a > link to documentation where I can find this? > > Example: > > SELECT 'ba_'|| foo || '_pr_' > FROM 'foobaa' > WHERE id=1234; || in PostgreSQL is a concatenation operator. It's equivalent to + in Microsoft SQL Server, or concat() in MySQL. So if foo = 'hello', the output of that select would be 'ba_hello_pr_' See http://www.postgresql.org/docs/current/static/functions-string.html Regards Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935 EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-novice по дате отправления: