Various UPDATE Scenarios

Database
TDW
Enthusiast

Various UPDATE Scenarios

Hello,

I have been checking the Internet for the syntax for the UPDATE statement. It seems there are many different ways to write an UPDATE statement and I am confused by the various examples.

Some examples use a derived table. Others an INNER JOIN.

Some place the "SET =" as the next line after the UPDATE. While others place SET is the last line of the SQL.

I am looking for the following 2 scenarios. However, if you can direct me to other scenarios, that would appreciated.

Table A and Table B.

Set A.col1 = 'Y'

Where B.col1 = 100

Another example

Table A and Table B.

Set A.col2 = B.col2

Where A.col3 = B.col3

Does this make sense?

You don't have to answer these here with examples (though that would be helpful) but I would appreciate if you could direct me to a resource that will show the various examples (without the techno speak of the TD manuals).

Thanks in advance for your help.

God Bless,

Genesius

2 REPLIES
TDW
Enthusiast

Re: Various UPDATE Scenarios

Hello.

Is this question not proper for this forum?

Thanks and God Bless,

Genesius

TDW
Enthusiast

Re: Various UPDATE Scenarios

Repost.

Any ideas would be appreciated.

Thanks and God Bless,

Genesius