Forums Register Login

what does "SELECT count(*) from Tablename" mean

+Pie Number of slices to send: Send
what is the exact function of count(*)???

and what does "SELECT count(*) from Table" syntax do and signify???
+Pie Number of slices to send: Send
count(argument) returns the number of rows (records) for this column(argument) in a table.

This returns the number of rows (records) in that table.

refer to this for more http://www.sql-tutorial.net/SQL-COUNT.asp
+Pie Number of slices to send: Send
count function gives the number of rows in a group/table.
"select count(*) from employee"
gives the total number of rows (employees) in the employee table.

"select count(*), department from employee group by department"
gives the number of employees in each department.
+Pie Number of slices to send: Send
thanks vishwanath and chadra prakash
+Pie Number of slices to send: Send
"Think Mad",
In case you didn't see my note in your other thread, note that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks,
Jeanne
Forum Bartender
There were millions of the little blood suckers. But thanks to this tiny ad, I wasn't bitten once.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 9226 times.
Similar Threads
Counting number of rows returned by select
count(*) vs count(id)
Select multiple tables using single resultset - SQLException: ORA-00933: SQL command not properly en
How do I format this query using JSP?
migration from MS sql 2000 to MS sql 2008
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 06:00:50.