Skip site navigation (1) Skip section navigation (2)

question on passing parameter in sql query

From: "Karthikeyan Sundaram" <skarthi98(at)hotmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: question on passing parameter in sql query
Date: 2007-02-08 00:49:45
Message-ID: BAY131-F28E2CC1D1B622B218CD5C3B09D0@phx.gbl (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-sql
Hi,

   I don't want to compare with Oracle and postgres. But I have a situation. 
  I am using psql command line tool supplied by postgres.

   In Oracle I can say

    select * from emp where emp_id = &1

   Oracle will ask:
   Enter a value for 1:

   If I enter 10, then Oracle will get the empid=10

  What is the equal command in postgres ?

Regards
skarthi

_________________________________________________________________
Invite your Hotmail contacts to join your friends list with Windows Live 
Spaces 
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us


Responses

pgsql-admin by date

Next:From: Jaime CasanovaDate: 2007-02-08 01:44:01
Subject: Re: Moving a table to another directory
Previous:From: Michael MonnerieDate: 2007-02-07 22:07:41
Subject: Re: destroyed db/index (corruption) [SOLVED]

pgsql-sql by date

Next:From: Chad WagnerDate: 2007-02-08 01:56:12
Subject: Re: [SQL] question on passing parameter in sql query
Previous:From: Philip HallstromDate: 2007-02-08 00:17:18
Subject: Re: Seeking quick way to clone a row, but give it a new pk.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group