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!

Simple Question

Status
Not open for further replies.

jisoo23

Programmer
Jan 27, 2004
192
US
Hello all,

Does anyone know if there's a "min" command for Postgresql? I have a field in a table that has a sequential numbering format (i.e. 1, 2, 3, etc). I want to be able to query the table and pull the record with the smallest number (in this case, 1). I don't want to use a select statement ordering by asc and taking the top result. I'd like to be able to use a single, short query like you would use COUNT or something. Does anyone know how?

Thanks
Jisoo22
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top