A quick glance suggests to me that it is a nonstandard proprietary
extension to SQL that provides a way to set a kind of a variable and use it
in a subsequent nonstandard proprietary SQL-looking statement that is
awfully procedural.  You'll probably want to either consult the
documentation for the RDBMS you use or ask your question on a mailing list
tailored to users and/or developers of the RDBMS you're using for a
definitive answer.

I can verify for you that it's not standard SQL, though.  And it looks to
me like they've gone and made what appears to be an extension that extends
SQL so it has some procedural capabilities.

There are problems on many levels with using SQL as a procedural language.
The most obvious problem with using nonstandard proprietary procedural
extensions to SQL is that (for example) you couldn't change backend
database without recoding all your nonstandard SQL-looking statements.  But
I suppose they can be helpful because you couldn't possibly do the same
thing with PHP (or perl, or a C program, or...) and standard SQL.  Oh,
wait.  You can do procedural things with de-facto standard and standard
procedural languages?  Well, I'm sure there's a reason to have nonstandard
proprietary extensions that add procedural capabilities to SQL or they
wouldn't have them.

(Note the clever way I mentioned PHP, since this is a PHP mailing list and
both the question and the answer have nothing to do with PHP.  It still
doesn't bring it on topic, but at least I tried.)

Doug

At 11:54 AM 6/26/01 +0800, Fai wrote:
>SELECT @A:=SUM(salary) FROM table1 WHERE type=1;
>UPDATE table2 SET summmary=@A WHERE type=1;
>
>What does @A: mean?
>
>Thank you very much!
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to