I accidentally coded SELECT $FOO..
and got the error "Invalid pseudocolumn "$FOO".
I can't find any documentation for them. Is it something I should know?
Edit: this is a MS SQL Server specific question.
A pseudocolumn behaves like a table column, but is not actually stored in the table. You can select from pseudocolumns, but you cannot insert, update, or delete their values. A pseudocolumn is also similar to a function without arguments (refer to Chapter 7, "Functions").
Pseudocode is an artificial and informal language that helps programmers develop algorithms. Pseudocode is a "text-based" detail (algorithmic) design tool. The rules of Pseudocode are reasonably straightforward. All statements showing "dependency" are to be indented. These include while, do, for, if, switch.
Pseudocolumn: A pseudo-column behaves like a table column but is not actually stored in the table. You can select from pseudo-columns, but you cannot insert, update, or delete their values. A pseudo-column is also similar to a function without arguments. This section describes these pseudo-columns: CURRVAL and NEXTVAL.
Pseudocolumns are symbolic aliases for actual columns, that have special properties, for example, $IDENTITY is an alias for the column that has the IDENTITY assigned, $ROWGUID for the column with ROWGUIDCOL assigned. It's used for the internal plumbing scripts.
I don't know why most of the answers are Oracle specific the Question is about SQL Server!
As well as RobsonROX's answer an other example of their use is in the output
clause of a merge
statement. $action
indicates whether the row was inserted or deleted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With