How to create SQL-Query to update data in tables?How can I prevent SQL injection in PHP?Add a column with a default value to an existing table in SQL ServerWhen should I use cross apply over inner join?MySQL - UPDATE query based on SELECT QueryHow do I UPDATE from a SELECT in SQL Server?Finding duplicate values in a SQL tableWhat are the options for storing hierarchical data in a relational database?SQL select only rows with max value on a columnSQL query return data from multiple tablesHow to import an SQL file using the command line in MySQL?
How to make all magic-casting innate, but still rare?
Definition of 'vrit'
I calculated that we should be able to see the sun well beyond the observable universe. Where did I go wrong?
Why one uses 了 and the other one doesn’t?
Bent arrow under a node
Old time bike. Can I put a rear derailleur?
Scaling an object to change its key
Leaving job close to major deadlines
Why are there no file insertion syscalls
Are intrusions within a foreign embassy considered an act of war?
How would one carboxylate CBG into it's acid form, CBGA?
Why is Havana covered in 5-digit numbers in Our Man in Havana?
"Correct me if I'm wrong"
What is the name of the person who reconciled a line from Rudram to dakshinamurthy and Adi Shankaracharya?
Is using legacy mode instead of UEFI mode a bad thing to do?
How would you explain #1 and #2 below using standard quotes?
sudo passwd username keeps asking for the current password
reverse a call to mmap()
How to ask if I can mow my neighbor's lawn
What preparations would Hubble have needed to return in a Shuttle?
Kelvin type connection
What is that ceiling compartment of a Boeing 737?
How Hebrew Vowels Work
Make symbols atomic, without losing their type
How to create SQL-Query to update data in tables?
How can I prevent SQL injection in PHP?Add a column with a default value to an existing table in SQL ServerWhen should I use cross apply over inner join?MySQL - UPDATE query based on SELECT QueryHow do I UPDATE from a SELECT in SQL Server?Finding duplicate values in a SQL tableWhat are the options for storing hierarchical data in a relational database?SQL select only rows with max value on a columnSQL query return data from multiple tablesHow to import an SQL file using the command line in MySQL?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm trying to update data in my table.
I have two tables, t1 and t2
T1
T2
I'm want to do, that if t1 have id_avito = null and all_usl_name = %usl_name1% and all_tel = %tel1%, and t2 have id != null, usl_name = %usl_name1% and tel = %tel1%
For example, t1 after execute query must to look like that
update people.t1, people.t2
set
id_avito = people.t2.id,
lnk_avito = people.t2.link,
all_price = people.t2.price,
all_date = people.t2.date,
all_adr = people.t2.adr,
all_usl_name = people.t2.usl_name
where id_avito != people.t2.id
and all_tel= people.t2.tel
and all_usl_type = people.t2.usl_type
I try to do like this, but it is not working
UPD
EXAMPLE: tables. Table before update, after update, and second table
mysql sql
add a comment |
I'm trying to update data in my table.
I have two tables, t1 and t2
T1
T2
I'm want to do, that if t1 have id_avito = null and all_usl_name = %usl_name1% and all_tel = %tel1%, and t2 have id != null, usl_name = %usl_name1% and tel = %tel1%
For example, t1 after execute query must to look like that
update people.t1, people.t2
set
id_avito = people.t2.id,
lnk_avito = people.t2.link,
all_price = people.t2.price,
all_date = people.t2.date,
all_adr = people.t2.adr,
all_usl_name = people.t2.usl_name
where id_avito != people.t2.id
and all_tel= people.t2.tel
and all_usl_type = people.t2.usl_type
I try to do like this, but it is not working
UPD
EXAMPLE: tables. Table before update, after update, and second table
mysql sql
1
"SQL" is just a language, not an actual product. Which version of SQL are you using (e.g MySQL, Oracle, SQL Server, Postgres, DB2, etc.) ? Also, if possible, please include your sample data as text directly in your question.
– Tim Biegeleisen
Mar 25 at 5:59
@TimBiegeleisen I'm using MySQL 5.0,7, about data, one minute please
– Actticus
Mar 25 at 6:02
add a comment |
I'm trying to update data in my table.
I have two tables, t1 and t2
T1
T2
I'm want to do, that if t1 have id_avito = null and all_usl_name = %usl_name1% and all_tel = %tel1%, and t2 have id != null, usl_name = %usl_name1% and tel = %tel1%
For example, t1 after execute query must to look like that
update people.t1, people.t2
set
id_avito = people.t2.id,
lnk_avito = people.t2.link,
all_price = people.t2.price,
all_date = people.t2.date,
all_adr = people.t2.adr,
all_usl_name = people.t2.usl_name
where id_avito != people.t2.id
and all_tel= people.t2.tel
and all_usl_type = people.t2.usl_type
I try to do like this, but it is not working
UPD
EXAMPLE: tables. Table before update, after update, and second table
mysql sql
I'm trying to update data in my table.
I have two tables, t1 and t2
T1
T2
I'm want to do, that if t1 have id_avito = null and all_usl_name = %usl_name1% and all_tel = %tel1%, and t2 have id != null, usl_name = %usl_name1% and tel = %tel1%
For example, t1 after execute query must to look like that
update people.t1, people.t2
set
id_avito = people.t2.id,
lnk_avito = people.t2.link,
all_price = people.t2.price,
all_date = people.t2.date,
all_adr = people.t2.adr,
all_usl_name = people.t2.usl_name
where id_avito != people.t2.id
and all_tel= people.t2.tel
and all_usl_type = people.t2.usl_type
I try to do like this, but it is not working
UPD
EXAMPLE: tables. Table before update, after update, and second table
mysql sql
mysql sql
edited Mar 25 at 10:57
Actticus
asked Mar 25 at 5:58
ActticusActticus
225
225
1
"SQL" is just a language, not an actual product. Which version of SQL are you using (e.g MySQL, Oracle, SQL Server, Postgres, DB2, etc.) ? Also, if possible, please include your sample data as text directly in your question.
– Tim Biegeleisen
Mar 25 at 5:59
@TimBiegeleisen I'm using MySQL 5.0,7, about data, one minute please
– Actticus
Mar 25 at 6:02
add a comment |
1
"SQL" is just a language, not an actual product. Which version of SQL are you using (e.g MySQL, Oracle, SQL Server, Postgres, DB2, etc.) ? Also, if possible, please include your sample data as text directly in your question.
– Tim Biegeleisen
Mar 25 at 5:59
@TimBiegeleisen I'm using MySQL 5.0,7, about data, one minute please
– Actticus
Mar 25 at 6:02
1
1
"SQL" is just a language, not an actual product. Which version of SQL are you using (e.g MySQL, Oracle, SQL Server, Postgres, DB2, etc.) ? Also, if possible, please include your sample data as text directly in your question.
– Tim Biegeleisen
Mar 25 at 5:59
"SQL" is just a language, not an actual product. Which version of SQL are you using (e.g MySQL, Oracle, SQL Server, Postgres, DB2, etc.) ? Also, if possible, please include your sample data as text directly in your question.
– Tim Biegeleisen
Mar 25 at 5:59
@TimBiegeleisen I'm using MySQL 5.0,7, about data, one minute please
– Actticus
Mar 25 at 6:02
@TimBiegeleisen I'm using MySQL 5.0,7, about data, one minute please
– Actticus
Mar 25 at 6:02
add a comment |
2 Answers
2
active
oldest
votes
Try with update join also you need to use like operator where you are searching with string
update people.t1 a
join people.t2 on id_avito != people.t2.id
and all_tel= people.t2.tel
and all_usl_type = people.t2.usl_type
set
id_avito = people.t2.id,
lnk_avito = people.t2.link,
all_price = people.t2.price,
all_date = people.t2.date,
all_adr = people.t2.adr,
all_usl_name = people.t2.usl_name
I don't use constant strings, i should to take it from t2
– Actticus
Mar 25 at 6:13
@Actticus, it's not constant, have you tried the code
– fa06
Mar 25 at 6:15
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:29
@Actticus, you can check now
– fa06
Mar 25 at 6:55
I create a new SQLQuery and copypaste your code, and nothing against
– Actticus
Mar 25 at 7:01
|
show 3 more comments
Please try this.
For SQL
UPDATE A
SET
A.id_avito = B.id,
A.lnk_avito = B.link,
A.all_price = B.price,
A.all_date = B.date,
A.all_adr = B.adr,
A.all_usl_name = B.usl_name
FROM
people.t1 A
INNER JOIN people.t2 B
ON A.id_avito != B.id
AND A.all_tel= B.tel
AND A.all_usl_type =B.usl_type
where ISNULL(A.id_avito,'') ='' and A.all_usl_name like '%usl_name1%' and A.all_tel like '%tel1%' and B.id is not null and B.usl_name like '%usl_name1%' and B.tel like '%tel1%'
FOR MYSQL
UPDATE people.t1 a
INNER JOIN people.t2 B
ON A.id_avito != B.id
AND A.all_tel= B.tel
AND A.all_usl_type =B.usl_type
SET
A.id_avito = B.id,
A.lnk_avito = B.link,
A.all_price = B.price,
A.all_date = B.date,
A.all_adr = B.adr,
A.all_usl_name = B.usl_name
where IFNULL(A.id_avito,'') = '' and A.all_usl_name like '%usl_name1%' and A.all_tel like '%tel1%' and IFNULL(B.id,0) <> 0 and B.usl_name like '%usl_name1%' and B.tel like '%tel1%'
No that's don't working, nothing not update
– Actticus
Mar 25 at 6:10
Please get new solution.
– Hemang Aghera
Mar 25 at 6:13
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:30
Please get new solution
– Hemang Aghera
Mar 25 at 6:37
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:48
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55331966%2fhow-to-create-sql-query-to-update-data-in-tables%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try with update join also you need to use like operator where you are searching with string
update people.t1 a
join people.t2 on id_avito != people.t2.id
and all_tel= people.t2.tel
and all_usl_type = people.t2.usl_type
set
id_avito = people.t2.id,
lnk_avito = people.t2.link,
all_price = people.t2.price,
all_date = people.t2.date,
all_adr = people.t2.adr,
all_usl_name = people.t2.usl_name
I don't use constant strings, i should to take it from t2
– Actticus
Mar 25 at 6:13
@Actticus, it's not constant, have you tried the code
– fa06
Mar 25 at 6:15
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:29
@Actticus, you can check now
– fa06
Mar 25 at 6:55
I create a new SQLQuery and copypaste your code, and nothing against
– Actticus
Mar 25 at 7:01
|
show 3 more comments
Try with update join also you need to use like operator where you are searching with string
update people.t1 a
join people.t2 on id_avito != people.t2.id
and all_tel= people.t2.tel
and all_usl_type = people.t2.usl_type
set
id_avito = people.t2.id,
lnk_avito = people.t2.link,
all_price = people.t2.price,
all_date = people.t2.date,
all_adr = people.t2.adr,
all_usl_name = people.t2.usl_name
I don't use constant strings, i should to take it from t2
– Actticus
Mar 25 at 6:13
@Actticus, it's not constant, have you tried the code
– fa06
Mar 25 at 6:15
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:29
@Actticus, you can check now
– fa06
Mar 25 at 6:55
I create a new SQLQuery and copypaste your code, and nothing against
– Actticus
Mar 25 at 7:01
|
show 3 more comments
Try with update join also you need to use like operator where you are searching with string
update people.t1 a
join people.t2 on id_avito != people.t2.id
and all_tel= people.t2.tel
and all_usl_type = people.t2.usl_type
set
id_avito = people.t2.id,
lnk_avito = people.t2.link,
all_price = people.t2.price,
all_date = people.t2.date,
all_adr = people.t2.adr,
all_usl_name = people.t2.usl_name
Try with update join also you need to use like operator where you are searching with string
update people.t1 a
join people.t2 on id_avito != people.t2.id
and all_tel= people.t2.tel
and all_usl_type = people.t2.usl_type
set
id_avito = people.t2.id,
lnk_avito = people.t2.link,
all_price = people.t2.price,
all_date = people.t2.date,
all_adr = people.t2.adr,
all_usl_name = people.t2.usl_name
edited Mar 25 at 6:55
answered Mar 25 at 6:01
fa06fa06
22.3k41119
22.3k41119
I don't use constant strings, i should to take it from t2
– Actticus
Mar 25 at 6:13
@Actticus, it's not constant, have you tried the code
– fa06
Mar 25 at 6:15
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:29
@Actticus, you can check now
– fa06
Mar 25 at 6:55
I create a new SQLQuery and copypaste your code, and nothing against
– Actticus
Mar 25 at 7:01
|
show 3 more comments
I don't use constant strings, i should to take it from t2
– Actticus
Mar 25 at 6:13
@Actticus, it's not constant, have you tried the code
– fa06
Mar 25 at 6:15
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:29
@Actticus, you can check now
– fa06
Mar 25 at 6:55
I create a new SQLQuery and copypaste your code, and nothing against
– Actticus
Mar 25 at 7:01
I don't use constant strings, i should to take it from t2
– Actticus
Mar 25 at 6:13
I don't use constant strings, i should to take it from t2
– Actticus
Mar 25 at 6:13
@Actticus, it's not constant, have you tried the code
– fa06
Mar 25 at 6:15
@Actticus, it's not constant, have you tried the code
– fa06
Mar 25 at 6:15
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:29
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:29
@Actticus, you can check now
– fa06
Mar 25 at 6:55
@Actticus, you can check now
– fa06
Mar 25 at 6:55
I create a new SQLQuery and copypaste your code, and nothing against
– Actticus
Mar 25 at 7:01
I create a new SQLQuery and copypaste your code, and nothing against
– Actticus
Mar 25 at 7:01
|
show 3 more comments
Please try this.
For SQL
UPDATE A
SET
A.id_avito = B.id,
A.lnk_avito = B.link,
A.all_price = B.price,
A.all_date = B.date,
A.all_adr = B.adr,
A.all_usl_name = B.usl_name
FROM
people.t1 A
INNER JOIN people.t2 B
ON A.id_avito != B.id
AND A.all_tel= B.tel
AND A.all_usl_type =B.usl_type
where ISNULL(A.id_avito,'') ='' and A.all_usl_name like '%usl_name1%' and A.all_tel like '%tel1%' and B.id is not null and B.usl_name like '%usl_name1%' and B.tel like '%tel1%'
FOR MYSQL
UPDATE people.t1 a
INNER JOIN people.t2 B
ON A.id_avito != B.id
AND A.all_tel= B.tel
AND A.all_usl_type =B.usl_type
SET
A.id_avito = B.id,
A.lnk_avito = B.link,
A.all_price = B.price,
A.all_date = B.date,
A.all_adr = B.adr,
A.all_usl_name = B.usl_name
where IFNULL(A.id_avito,'') = '' and A.all_usl_name like '%usl_name1%' and A.all_tel like '%tel1%' and IFNULL(B.id,0) <> 0 and B.usl_name like '%usl_name1%' and B.tel like '%tel1%'
No that's don't working, nothing not update
– Actticus
Mar 25 at 6:10
Please get new solution.
– Hemang Aghera
Mar 25 at 6:13
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:30
Please get new solution
– Hemang Aghera
Mar 25 at 6:37
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:48
add a comment |
Please try this.
For SQL
UPDATE A
SET
A.id_avito = B.id,
A.lnk_avito = B.link,
A.all_price = B.price,
A.all_date = B.date,
A.all_adr = B.adr,
A.all_usl_name = B.usl_name
FROM
people.t1 A
INNER JOIN people.t2 B
ON A.id_avito != B.id
AND A.all_tel= B.tel
AND A.all_usl_type =B.usl_type
where ISNULL(A.id_avito,'') ='' and A.all_usl_name like '%usl_name1%' and A.all_tel like '%tel1%' and B.id is not null and B.usl_name like '%usl_name1%' and B.tel like '%tel1%'
FOR MYSQL
UPDATE people.t1 a
INNER JOIN people.t2 B
ON A.id_avito != B.id
AND A.all_tel= B.tel
AND A.all_usl_type =B.usl_type
SET
A.id_avito = B.id,
A.lnk_avito = B.link,
A.all_price = B.price,
A.all_date = B.date,
A.all_adr = B.adr,
A.all_usl_name = B.usl_name
where IFNULL(A.id_avito,'') = '' and A.all_usl_name like '%usl_name1%' and A.all_tel like '%tel1%' and IFNULL(B.id,0) <> 0 and B.usl_name like '%usl_name1%' and B.tel like '%tel1%'
No that's don't working, nothing not update
– Actticus
Mar 25 at 6:10
Please get new solution.
– Hemang Aghera
Mar 25 at 6:13
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:30
Please get new solution
– Hemang Aghera
Mar 25 at 6:37
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:48
add a comment |
Please try this.
For SQL
UPDATE A
SET
A.id_avito = B.id,
A.lnk_avito = B.link,
A.all_price = B.price,
A.all_date = B.date,
A.all_adr = B.adr,
A.all_usl_name = B.usl_name
FROM
people.t1 A
INNER JOIN people.t2 B
ON A.id_avito != B.id
AND A.all_tel= B.tel
AND A.all_usl_type =B.usl_type
where ISNULL(A.id_avito,'') ='' and A.all_usl_name like '%usl_name1%' and A.all_tel like '%tel1%' and B.id is not null and B.usl_name like '%usl_name1%' and B.tel like '%tel1%'
FOR MYSQL
UPDATE people.t1 a
INNER JOIN people.t2 B
ON A.id_avito != B.id
AND A.all_tel= B.tel
AND A.all_usl_type =B.usl_type
SET
A.id_avito = B.id,
A.lnk_avito = B.link,
A.all_price = B.price,
A.all_date = B.date,
A.all_adr = B.adr,
A.all_usl_name = B.usl_name
where IFNULL(A.id_avito,'') = '' and A.all_usl_name like '%usl_name1%' and A.all_tel like '%tel1%' and IFNULL(B.id,0) <> 0 and B.usl_name like '%usl_name1%' and B.tel like '%tel1%'
Please try this.
For SQL
UPDATE A
SET
A.id_avito = B.id,
A.lnk_avito = B.link,
A.all_price = B.price,
A.all_date = B.date,
A.all_adr = B.adr,
A.all_usl_name = B.usl_name
FROM
people.t1 A
INNER JOIN people.t2 B
ON A.id_avito != B.id
AND A.all_tel= B.tel
AND A.all_usl_type =B.usl_type
where ISNULL(A.id_avito,'') ='' and A.all_usl_name like '%usl_name1%' and A.all_tel like '%tel1%' and B.id is not null and B.usl_name like '%usl_name1%' and B.tel like '%tel1%'
FOR MYSQL
UPDATE people.t1 a
INNER JOIN people.t2 B
ON A.id_avito != B.id
AND A.all_tel= B.tel
AND A.all_usl_type =B.usl_type
SET
A.id_avito = B.id,
A.lnk_avito = B.link,
A.all_price = B.price,
A.all_date = B.date,
A.all_adr = B.adr,
A.all_usl_name = B.usl_name
where IFNULL(A.id_avito,'') = '' and A.all_usl_name like '%usl_name1%' and A.all_tel like '%tel1%' and IFNULL(B.id,0) <> 0 and B.usl_name like '%usl_name1%' and B.tel like '%tel1%'
edited Mar 25 at 6:37
answered Mar 25 at 6:02
Hemang AgheraHemang Aghera
966114
966114
No that's don't working, nothing not update
– Actticus
Mar 25 at 6:10
Please get new solution.
– Hemang Aghera
Mar 25 at 6:13
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:30
Please get new solution
– Hemang Aghera
Mar 25 at 6:37
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:48
add a comment |
No that's don't working, nothing not update
– Actticus
Mar 25 at 6:10
Please get new solution.
– Hemang Aghera
Mar 25 at 6:13
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:30
Please get new solution
– Hemang Aghera
Mar 25 at 6:37
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:48
No that's don't working, nothing not update
– Actticus
Mar 25 at 6:10
No that's don't working, nothing not update
– Actticus
Mar 25 at 6:10
Please get new solution.
– Hemang Aghera
Mar 25 at 6:13
Please get new solution.
– Hemang Aghera
Mar 25 at 6:13
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:30
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:30
Please get new solution
– Hemang Aghera
Mar 25 at 6:37
Please get new solution
– Hemang Aghera
Mar 25 at 6:37
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:48
0 row(s) affected Rows matched: 0 Changed: 0 Warnings: 0
– Actticus
Mar 25 at 6:48
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55331966%2fhow-to-create-sql-query-to-update-data-in-tables%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
"SQL" is just a language, not an actual product. Which version of SQL are you using (e.g MySQL, Oracle, SQL Server, Postgres, DB2, etc.) ? Also, if possible, please include your sample data as text directly in your question.
– Tim Biegeleisen
Mar 25 at 5:59
@TimBiegeleisen I'm using MySQL 5.0,7, about data, one minute please
– Actticus
Mar 25 at 6:02