qw 123
Create table a

(

Id int primary key is not an empty identifier (1, 1).

name varchar(20) unique,

pwd varchar(30)

)

Create table b

(

Id int primary key is not an empty identifier (1, 1).

name varchar(20) unique,

info varchar(30)

)

Insert a value ('qw',' 123')

Insert b value ('qw', Null)

Select * from a.

Select * from B.

1 qw 123

1 qw NULL

Sql replacement:

According to your request, insertion should not be used.

Please use update instead.

The code is as follows:

Update b set information =(select pwd from a, b where a.name=b.name).

(1 line affected)

Select * from a.

Select * from B.

The result is expected!

Hmm. How interesting

In other words:

Update b set information = (select pwd from connection b on a.name=b.name)

* * * Learn together!