Home > database >  How do you write SQL statement
How do you write SQL statement

Time:10-18

Update table a set address=(select names from the administrative region where b. b code=a. area code)
How to update when single subquery return multiple line error, should be how to write, to ask

CodePudding user response:

This has nothing to do with SQL, and you have a business relationship, because a table of more than one area code to match the line b table records, you have to know our business which is what you need, such as the point of violence may be any one, so just limit returns one row,

CodePudding user response:

reference 1st floor minsic78 response:
this has nothing to do with SQL, and you have a business relationship, because a table of more than one area code to match the line b table records, you have to know our business which is what you need, such as the point of violence may be any one, so just limit returns one row,

Is according to the id card before six with new address, should how to write ah, a place to have a lot of article

CodePudding user response:

How records, if you make sure no one code corresponding to a number of different addresses, then it is good to add a Distinct directly

CodePudding user response:

Yes, this is obviously a one-to-many relationship, upstairs truth!

CodePudding user response:

Good solved, dictionary have repeated
  • Related