Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Browse by Tags · View All
sql_server 217
t-sql 211
tsql 116
sqlserver 96
BRH 78
#SQLServer 66
#TSQL 56
SQL Server 34
function 11
SSMS 9

Archive · View All
August 2007 17
August 2010 8
June 2012 7
June 2011 7
November 2007 7
August 2012 6
May 2012 6
November 2011 6
August 2011 6
October 2011 6

Madhivanan's TSQL Blog

Question of the month November 2011 - What is pseudocolumn in SQL Server?

Nov 9 2011 1:08AM by Madhivanan   

Run this code

select $k

You will get following error

Msg 126, Level 15, State 1, Line 1
Invalid pseudocolumn "$k".

What is the pseudocolumn in SQL Server?

Tags: t-sql, sql_server, sqlserver, tsql, question, puzzle,


Madhivanan
3 · 39% · 12430
6
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

6  Comments  

  • pseudo column is a act as an database table column,but its not a actual column in a table,we can fetch value from a pseudo column. ex. user,usid,rownum,rowid,level,nextval,curval,sysdate

    commented on Nov 11 2011 6:51AM
    Alpesh Patel
    36 · 5% · 1663
  • It is the column, which is not available in the Database table physically. ex. select user

    commented on Nov 11 2011 6:54AM
    VenkataRaman
    2895 · 0% · 2
  • 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.

    commented on Nov 16 2011 12:18AM
    Zubair Khalid
    160 · 1% · 298
  • A pseudocolumnis a one who behave likes a column of a table but that table doesn't exists physically. In SQL server Inserted table and Deleted table can be refers to as pseudocolumn.

    commented on Nov 18 2011 12:27PM
    Vivek Johari
    115 · 1% · 445
  • Try this: CREATE TABLE t(x INT IDENTITY, y UNIQUEIDENTIFIER ROWGUIDCOL) SELECT $IDENTITY, $ROWGUID FROM t

    I'm not aware of any other pseudocolumn, except $IDENTITY and $ROWGUID. $PARTITION looks more like a special keyword needed for a function call.

    Razvan

    commented on Nov 21 2011 6:06AM
    Razvan Socol
    176 · 1% · 278
  • Pseudocolumns are indirect references to specific columns in a table. For example, the pseudocolumn $IDENTITY will return the value of the identity field within a given table. For example:

    CREATE TABLE #test (i1 int IDENTITY(1,1), d1 varchar(10))
    INSERT INTO #test (d1) VALUES ('Row 1')
    SELECT $identity FROM #test AS t
    

    The select statement returns a recordset showing column i1 by name, and all of its values.

    When selecting against a table that does not have the specified pseudocolumn, the query returns the following error (for $rowguid):

    SELECT $rowguid FROM #test AS t
    ---------
    Msg 207, Level 16, State 1, Line 1
    Invalid column name '$rowguid'.
    

    Simply adding a uniqueidentifier to the table will not remove this error. Instead, you need to add a column with the ROWGUIDCOL property:

    ALTER TABLE #test ADD guidcol uniqueidentifier CONSTRAINT Guid_Default DEFAULT NEWID() ROWGUIDCOL
    

    Selecting $ROWGUID at this point will return the values in the guidcol column.

    As far as I know, $IDENTITY and $ROWGUID are the only defined pseudocolumns in SQL Server. The $PARTITION value may or may not also be considered a pseudocolumn, but it works on table partitions instead. Since partitions are not columns, I do not consider it to be a pseudocolumn.

    commented on Nov 21 2011 1:02PM
    brendthess
    1093 · 0% · 23

Your Comment


Sign Up or Login to post a comment.

"Question of the month November 2011 - What is pseudocolumn in SQL Server?" rated 5 out of 5 by 6 readers
Question of the month November 2011 - What is pseudocolumn in SQL Server? , 5.0 out of 5 based on 6 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]