Relative Content

Tag Archive for sqlmysqlcountgroup

count number of row in table

I am struggling to find a right syntax to get number a rows ( result ) in a new column in a table.
ie
My table has id, date, created_by as columns,
what I need is to have a new column to show the number of results ( I can understand if I have it as a new column it is going to repeat it for each row, but cant think of any better day to have the record set.
I have tried this count(id) as result , date, created_by from my table but it is require group and that isnt what I am looking because it group for each row which comes out as one,
(When I run select id, date, created_by from my_table —- the result is 350 and I need to have that record).