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!

get a row count

Status
Not open for further replies.

QAteste

Technical User
Jun 14, 2002
23
US
From the DB2 command window how can I get a count of rows matching a particular expression. Here is my select statement and I saw something in the forum about a select count(*) but was unsure how to use it. Thanks in advance!!!

select * from db2admin.hit_facts where gmttimofday_id > 3359 and gmttimofday_id < 7200
 
Your almost there, simply missed the count off.

Try the following

select count(*)
from db2admin.hit_facts
where
gmttimofday_id > 3359 and
gmttimofday_id < 7200


Cheers
Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top