Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
I have fields (pay_area, varchar(20)) with different values in my MySQL database. Some of them are like blabla.one blabla.two etc and others are completely different.
For example:
blabla.one, ads, blabla.one, payment, blabla.tree and so on.
I have to count all the fields starting only with blabla.
How can I do that?
SELECT count(id)
FROM TABLE
WHERE pay_area LIKE 'blabla.%'
If you want to fetch more fields then you can select other columns as well
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 months ago.
Improve this question
I want to insert data into my table but it is showing the error "Column count doesn't match value count at row 1"
I am trying to insert data into my tables
From the last image you have posted,we can find that the columns count is not the same with value count,you need to add , to seperate each value parameters
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 months ago.
Improve this question
SELECT table1.CreatedAt
FROM table1
LEFT JOIN table1.CreatedAt
ON table1.CreatedAt=[testDebtMarketData$].Date
WHERE [testDebtMarketData$].Date = NULL
but when I do SELECT * FROM table1 it works and I can see the table...
You need to specify a table directly after LEFT JOIN, not a column.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
I am running this query,
DELETE FROM media WHERE id IN ('19,18')
Its only deleting record with id 19 as you can see in the picture.
The column type of id is integer though.
You are passing a string which is being converted to the first integer (19). Remove the quotes.
DELETE FROM media WHERE id IN (19,18)
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 5 years ago.
Improve this question
I have a list of zip codes in this format:
ZIP CODES
84038-4323
93434-4320
The user types it in like this: 84038
I'm trying to figure out how to do something like this in MySQL
SELECT * FROM locations WHERE ZipCode STARTSWITH '${userZip}'
I need the first part of the zip code to match exactly.
I tried this
SELECT * FROM locations WHERE ZipCode LIKE '${userZip}%'
But it's returning extra data, it appears the LIKE command is not strict enough.
I think you should consider using - too in where condition. Something like below using REGEXP
SELECT * FROM locations WHERE ZipCode REGEXP '^{userZip}-'
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
This is my query. It show results but instead of name of the day it shows only number or id. How to change it?
SELECT challenger, challenged, day_id, date_match, CONCAT(term_start,' - ',term_end)
AS term FROM barbara_schedule
INNER JOIN barbara_days ON barbara_schedule.day_id = barbara_days.id_day
ORDER BY date_match, term_start ASC
You're only selecting day_id (from the table which I think also contains the actual day).
Add the name of the day column name to your query.