Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a table that contains a column price with 3600 entries. I need to increase the price column by 9% or multiply the contents of the column price by 1.09 and place the updated price back in the price column. What is the best way to approach this?
Should be pretty straightforward:
Update MyTable Set Price = Price*1.09
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
so let's say I have 5000 rows, I want to select the rows from 2000 to 3000 only, how to do that via a SQL query?
Try this
select * from table limit 2000,1000
limit from,how-many
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Lets say I have the table as follows
Name Firm Salary
Aron X 100
Bill X 200
Clint Y 300
I want to find the firm with maximum number of employees and produce the result
Firm Total
X 2
However here is my problem, The following query never works in MySQL
select firm,max(Number_Of_Employees) as Total from
(select firm,count(*) as Number_Of_Employees from works group by firm)
as temp;
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I've got a large database table and wanting to select rows in the column 'cat_id' containing the value "79", then replace all the values in a column called "system" with the value "6" for the selected rows.
This query will do that:
UPDATE `table` SET `system` = '6' WHERE `cat_id` = '79'
I could be misunderstanding you, but i think you are looking for a simple update:
UPDATE yourTable
SET system = 6
WHERE cat_id = 79;
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a database like this:-
state_name|district_name|id
jammu |kupwara |jk-01
kashmir |anantnag |jk-02
I want a mysql Query such that when
statename is selected (jammu), distname should be selected(kupwara) based on thier id.
If any one knows please help me out.Thanks in Advance
If I understood your question properly, then query should be like this
SELECT state_name,district_name from TableName WHERE id='jk-01' //you can have your specific id here
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a column with values like 24,25,26,27 and
I want to match 24 (or some other number).
I like to do it based on regex don't know how to do?
I want the matching should be clear like 24,25,26 should match with 24 not 243
You can take a look at
FIND_IN_SET
SELECT FIND_IN_SET('24','24,25,26 ');
Note Please don't store vales as comma separated instead normalize
your structure