Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
284 views
in Technique[技术] by (71.8m points)

mysql - how to check a column of each cell value in table A from the column fo table B of each cell And than?

halo all guys . i am a very newbie of SQL /mySQL I google it about 2-3 days. but cannot figure out , deal with my question..

I found some topics about my question in stackoverflow . but most of answer is not relevant or just tell me del the column and update it again

OK stop my trash talking .. and the question is :

table A

| id | content |
| -------- | -------------- |
| 1  |         |
|2|          |
|3|
|4|

table B

|content |
| -------- 
| dfalsdhfilu  |
|adslfhafilh|      
|alisudhfiduh|
|liaudshfiadsh|
|and|
|so|
|on|

I could like to copy first row cell in "content" in table B into the first cell of "content" column in table A and second to second and so on (row numbers in each table do not same)

And that , table B will updated according to column "content" cells with values and table A column "id" only, with number, leave content to be empty .

And i need to check that the updated table B "content" cells values whether exist in a cell in table A "content" already . If yes, skip the value until a value doesn't exist already in table A "content" of each cell.

IF NO, copy the value in table B "content" to the table A . Doesn't need to concern to create new row in table A. Just consider how to copy value from B to A without same value exist

What functions / commands i need to learn.?
and how can i do it.?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
...