Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record exists?

Status
Not open for further replies.

BBDan

IS-IT--Management
Jul 4, 2003
10
US
Hello,

Is there any postgresql command that tells you whether an entry exists in the table?

Thanks
 
Hi,

why don't you use "Select" and see if it returns the entry?

Greetings

--
Smash your head on keyboard to continue...
 
Suppose I have a lot of entries that I need to search, then is there a more efficient way rather then select?
 
Hi BBDan,

You might try the count parameter in conjuction with the SELECT command. It will return a number equal to the rows that match the Select, rather than returning the rows. Also, if you only need to know if a least one record meets the condition, you can use the limit parameter along with the count in the Select.

LelandJ

Leland F. Jackson, CPA
Software - Master (TM)
Nothing Runs Like the Fox
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top