Questions tagged [rowid]

210 questions
101
votes
13 answers

Equivalent of Oracle's RowID in SQL Server

What's the equivalent of Oracle's RowID in SQL Server?
None
42
votes
6 answers

ROWID (oracle) - any use for it?

My understanding is that the ROWID is a unique value for each row in the result returned by a query. Why do we need this ROWID? There is already the ROWNUM in ORACLE. Have any one used ROWID in a SQL query?
user319280
  • 757
  • 1
  • 8
  • 14
41
votes
7 answers

Using text as a primary key in SQLite table bad?

Is it bad to have text as a primary key in an SQLite database? I heard that it's bad for performance reasons, is this true? And will the rowid be used as the actual primary key in such a case?
mpellegr
  • 3,072
  • 3
  • 22
  • 36
30
votes
4 answers

Equivalent of Oracle’s RowID in MySQL

is there an equivalent of oracle's rowid in mysql? delete from my_table where rowid not in (select max(rowid) from my_table group by field1,field2) I want to make a mysql equivalent of this query!!! What i'm trying to do is, : The my_table has no…
raj
  • 3,769
  • 4
  • 25
  • 43
21
votes
1 answer

Displaying RowID in Select * (all) Statement

I am trying to display the RowID alongside all columns from a Select * statement. I am using Oracle with Toad to run the SQL statement. I have two tables that I need to compare, but I do not have any unique identifiers to use when sorting the two…
Marwan مروان
  • 2,163
  • 8
  • 30
  • 40
17
votes
3 answers

What can cause an Oracle ROWID to change?

AFAIK ROWID in Oracle represents physical location of a record in appropriate datafile. In which cases ROWID of a record may change ? The one known to me is UPDATE on partitioned table that "moves" the record to another partition. Are there another…
Dmitry Khalatov
  • 4,313
  • 3
  • 33
  • 39
15
votes
4 answers

What is rowID & rowNum (ROWID vs ROWNUM)

I'd like to know difference between rowID and rowNUM And how to see both of these in our table. when I execute this: SELECT * FROM emp WHERE rownum=1 It returns one query but when I do the same for rowid it says inconsistent datatypes: expected…
inityk
  • 476
  • 1
  • 9
  • 18
14
votes
1 answer

SQLite - Foreign key referencing rowid alias. Legal or not?

In the SQLite documentation it says: The parent key of a foreign key constraint is not allowed to use the rowid. The parent key must used named columns only. The parent key must be a named column or columns in the parent table, not the…
user2672807
  • 1
  • 2
  • 7
  • 20
10
votes
3 answers

How do I get row id of a row in sql server

I have one table CSBCA1_5_FPCIC_2012_EES207201222743, having two columns employee_id and employee_name I have used following query SELECT ROW_NUMBER() OVER (ORDER BY EMPLOYEE_ID) AS ID, EMPLOYEE_ID,EMPLOYEE_NAME FROM…
Ravi
  • 30,829
  • 42
  • 119
  • 173
10
votes
3 answers

Datatype of ROWID in Oracle/SQL

What is the data type of ROWID in Oracle/SQL? How is this value stored?
oneiros
  • 3,527
  • 12
  • 44
  • 71
8
votes
1 answer

Valid range of SQLite rowid?

I'm making a wrapper of SQLite C API. And I want to return rowid as integer type. To mark error case, I need a invalid value of the rowid. Is there invalid value of SQLite rowid? Or all values in signed 64bit integers are valid for rowid? (because…
eonil
  • 83,476
  • 81
  • 317
  • 516
6
votes
1 answer

Oracle Database Change Notification and ROWID's

Oracle's database change notification feature sends rowids (physical row addresses) on row inserts, updates and deletes. As indicated in the oracle's documentation this feature can be used by the application to built a middle tier cache. But this…
Andy Dufresne
  • 6,022
  • 7
  • 63
  • 113
6
votes
2 answers

The GENERATEDKEY Value is Missing from my CFQUERY Result Structure

I have two different CF11 applications with two different datasources each with its own back-end schema on the same Oracle 12g database. In one datasource dsA, when I use CFQUERY to insert a new record, the result structure contains a GENERATEDKEY…
M.Shute
  • 347
  • 1
  • 2
  • 11
5
votes
3 answers

Will rowid be reused?

In database, such as Informix, DB2, Oracle etc, will the rowid be reused pls?
Xiaowei
  • 73
  • 1
  • 4
5
votes
3 answers

How to use the physical location of rows (ROWID) in a DELETE statement

I have a table that has a lot of duplicated rows and no primary key. I want to remove just the duplicated records, but when I try to do this it would remove all peers. How can I find the ROWID from a table in Postgres?
endrigoantonini
  • 1,191
  • 2
  • 15
  • 28
1
2 3
13 14