AFAIK SET and VALUES INTO work in the same way.
SET and VALUES INTO work both if a single value is to be returned from a
function or if a single row is to be returned.
The only difference I know is, VALUES INTO can be used with dynamic SQL,
while SET cannot be used with dynamic SQL.
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
dlclark@xxxxxxxxxxxxxxxx
Sent: Freitag, 28. Juli 2017 18:50
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: SQL: VALUES ... INTO vs. SET
"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> wrote on 07/28/2017
12:35:49 PM:
Any thoughts on if it's better to use the SQL construct 'VALUES ...
INTO' or 'SET' to assign a value using a SQL function?
Are you saying you can use SET to get a value from a table column?
If so, I didn't know you could do that. And, if so, then I would say that
SET would be fine for a single value/column where VALUES...INTO would be
used for multiple columns.
Sincerely,
Dave Clark
--
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300
Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio 45439 USA
(937) 294-5331
****************************************************************************
*****************
This email message and any attachments is for use only by the named
addressee(s) and may contain confidential, privileged and/or proprietary
information. If you have received this message in error, please immediately
notify the sender and delete and destroy the message and all copies. All
unauthorized direct or indirect use or disclosure of this message is
strictly prohibited. No right to confidentiality or privilege is waived or
lost by any error in transmission.
****************************************************************************
*****************
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.