-
Since you don't know the primary key in your t hy cus install table, it's safer to use exists.
update t_hy_cus_install t setwhere exists( select 1from t_hy_cus_install t1, t_hy_cus_install_detail t2
where =
and <>2
and like'%n2%' and
and and
and and= ;
-
update t_hy_cus_install hmjx=1 where install_bill_id in (select ,from t_hy_cus_install t1, t_hy_cus_install_detail t2
where =
and <>2
and like'%n2%')
That's it, look at the tables in your database.
-
Actually, it's very simple, replace everything from before: update t1 set'1', the whole is as follows:
update t1 set '1'
from t_hy_cus_install t1, t_hy_cus_install_detail t2
where =
and <>2
and like'%n2%'
-
Your sentence is too confusing, and you need to be clear about a few points according to what you mean.
1.If you use table B data to update table A, what is the where condition, that is, what data in table A is updated and what data is used in table B, and what is the relationship between the two. I can't see the correlation between table b and table a from your statement.
2.After the association condition is found, whether the data in table b is unique or not, the error "more than one line of return value" will still occur.
According to the structure and data of your table, assuming that the name column in table A and table B is unique, and the name is used as the association, you can write it like this to achieve your update purpose:
update a set cou2 = (select b_cou1 from b where = where name in (select b_name from b where =
This statement must meet the unique condition that the name is in tables A and B before it can be used.
-
cou2=(select b cou1 from b where(condition 1)) where name=(select b name from b where(condition 1)).
select b cou1 from b where(condition 1) This subquery can have only one record.
It can be changed to: update a a set cou2=
where exists
select * from b b where b name = and (condition 1)).
select * from log a,(select ,max(date) from logwhere id='10000' >>>More
There are some small misunderstandings, even if you lock BL, you can't find the location of the phone, it's very simple, just turn it off. >>>More
All of them are just different expressions
The members of the Xin Orchestra are composed of the head and drummer Huang Mike, the lead singer Liu Wenjie, the guitarist Sun Zhiqun, the bassist Liu Xiaohua, and the keyboardist Fu ChaohuaćIn 2002, the orchestra was initially led by Su Jianxin, and launched the first **** letter orchestra with the same name**, thus officially debuting. In 2004, he starred in the biographical idol drama Death Must Love. >>>More
Refers to Dayu's water control, and Dayu's contributions.