_rowid
Access the unique row identifier. This pseudo column often aliases the primary key, allowing direct row access even if the primary key column name is unknown.
Syntax
_rowidDescription
Examples
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(80));
INSERT INTO t1 VALUES (1,"one"),(2,"two");
SELECT * FROM t1 WHERE _rowid=1;+---+------+
| a | b |
+---+------+
| 1 | one |
+---+------+UPDATE t1 SET b="three" WHERE _rowid=2;
SELECT * FROM t1 WHERE _rowid>=1 AND _rowid<=10;+---+-------+
| a | b |
+---+-------+
| 1 | one |
| 2 | three |
+---+-------+Last updated
Was this helpful?

