Search Postgresql Archives

Re: How can I use parameters in plain sql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 3, 2010 at 2:45 PM, John Adams <john_adams_mail@xxxxxxxxx> wrote:
> How can I use parameters in plain sql like sql server.
>
> FICTIONAL example that works for sql server:
> declare @i int;
> set @i = 1;
> select * from mytable where id=@i;

postgresql doesn't support variables in plain sql.  psql has some
client side manged variables, and you can of course use pl/pgsql.

merlin

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux