Mark Harrison
Mark Harrison

Reputation: 304434

Oracle: What is the data type of ORA_ROWSCN?

What is the data type of ORA_ROWSCN? It seems to be NUMBER but I cannot find it specified in the documentation.

declare
  myscn  ???;
begin
    select ora_rowscn into myscn from t where ...;
end;

Upvotes: 3

Views: 2418

Answers (1)

Justin Cave
Justin Cave

Reputation: 231651

It is a NUMBER. You can see yourself by creating a simple view and describing it (or selecting from *_tab_columns). Here's a simple sqlfiddle demonstration

create table foo (
   col1 number
);

create view vw_foo
as
select col1, ora_rowscn scn
  from foo;

select * 
  from user_tab_cols 
 where table_name = 'VW_FOO';

If you want more detail than you'd probably ever care about on the format of the SCN (system change number), here is one decent article

Upvotes: 3

Related Questions