Path: utzoo!attcan!uunet!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!uflorida!gatech!mcnc!rti!n5pph007!tpg From: tpg@n5pph007.UUCP (Peter Graham) Newsgroups: comp.databases Subject: Re: no. of rows Message-ID: <498@n5pph007.UUCP> Date: 12 Nov 90 14:55:27 GMT References: Reply-To: tpg@n5pph007.UUCP (T Peter Graham) Distribution: comp Organization: Northern Telecom, Research Triangle Park, North Carolina Lines: 31 In article ericco@ssl.berkeley.edu (Eric C. Olson) writes: >I'm new to the SQL game, so bear with me. Is there a way of >predicting the number of rows a query will return? For example: > > select column1 from table1 > >Can I find out how many rows will be returned? Do I have to make the >query twice? > >Thanks in advance, >Eric > >-- >Eric >ericco@ssl.berkeley.edu In Oracle, you can perform the following select: SELECT COUNT(*) FROM TABLE1; This will return the number of rows in the table. You can also supply an expression to return the number of rows meeting a specified criterion. Peter ------------------------------------------------------------------------- reply to: ...!mcnc!rti!n5pph007!tpg NTI may care what I say, but I'm not saying it for them...these opinions and statements are mine entirely