How can i count a specific ward in a table in database sql. Example, i have a table and i want to count how many times repeated ward "hello", can you help me please)
Asked
Active
Viewed 71 times
0
-
How does your table look? I'd be able to provide you with a functioning query if I have a rough idea how the table looks. – Thoby Apr 19 '17 at 13:07
-
@Thoby you can help me with any example) – anasalim28 Apr 19 '17 at 13:14
3 Answers
0
Lets say you have a target table ie tbl_test with a column i.e my_column, the query would look like this
SELECT COUNT(*) FROM tbl_test WHERE my_column = 'hello';
ABEL MASILA
- 666
- 2
- 7
- 24
-
-
For Ms Sql sever ,try this: [link](http://thesitedoctor.co.uk/blog/search-every-table-and-field-in-a-sql-server-database-updated). – ABEL MASILA Apr 19 '17 at 13:24
0
If I understand your question it should look like this:
SELECT COUNT(Word), Country
FROM Customers
WHERE Word='hello'
GROUP BY Country;
NoOorZ24
- 2,370
- 1
- 11
- 30
-
If you posted how your table looks I could write an example with your variables – NoOorZ24 Apr 19 '17 at 13:13
-
0
You can try select count(nameOfTheFieldWhenCanAppearHello)from table where nameOfTheFieldWhenCanAppearHello='Hello' group by nameOfTheFieldWhenCanAppearHello
Carolina Gil
- 1
- 1