问题标签 [rowid]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
5 回答
34721 浏览

android - 在 SQLite 表中使用文本作为主键不好?

在 SQLite 数据库中将文本作为主键是不是很糟糕?我听说由于性能原因这很糟糕,这是真的吗?在这种情况下,rowid 会被用作实际的主键吗?

0 投票
1 回答
2963 浏览

sql - 从 Oracle 输出参数中获取新插入的行 ID

我正在尝试在 oracle 中添加一个新行并获取新插入行的 ID,这就是我的代码的样子

我究竟做错了什么?

0 投票
2 回答
1099 浏览

oracle - 强制转换的 pl-sql 集合中的 ROWID

pl-sql 集合中是否有类似 rowid 的设施?就我而言,当我在 sql 查询中使用这个集合时,我还需要输入它们的序列号。我知道修改是数据结构是一种方式,但我想使用集合的索引。所以我正在寻找的是这样的:

循环不应该按顺序执行,但我想要一些内置的东西,比如 ROWID,它就像集合的索引。

0 投票
1 回答
2558 浏览

sqlite - 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 rowid.

But does that apply to an alias of the rowid? For example in SQLite if you have a INTEGER PRIMARY KEY column then that column is essentially an alias of the rowid:

With one exception noted below, if a rowid table has a primary key that consists of a single column and the declared type of that column is "INTEGER" in any mixture of upper and lower case, then the column becomes an alias for the rowid. Such a column is usually referred to as an "integer primary key".

(Exception omitted; not relevant here)

There is a similar question here: sql - Why does referencing a SQLite rowid cause foreign key mismatch? - Stack Overflow

If I take that example and modify it to use the alias (my integer primary key column) it appears to work:

But is it legal to reference an alias of the rowid? Thanks.

0 投票
2 回答
6013 浏览

sql - oracle rowid是如何内部生成的?

我想知道,oracle中的ROWID是增量生成的吗?如果我尝试以下查询

我是否总是会获得表中第一个插入行的 ROWID,或者我最终可能也会获得任何随机行的 ROWID?如果有人可以在这方面有所帮助,那将非常有帮助

0 投票
1 回答
52 浏览

sql - SQL获取第N行,删除后继续获取同一行

有人问我如何从表中获取第 N 行。但是,即使在删除/插入行之后,附加要求也应该保持返回同一行。

我怀疑有办法做到这一点。

但是,如果您有任何想法,请告诉我。提前谢谢。

0 投票
1 回答
7897 浏览

jquery - jqGrid AddRowData rowId 的值错误

如果我将本地数据(一行)添加到现有的 jqgrid,自动生成的值$.jgrid.randId()似乎是错误的。我需要新的行 ID 以进行进一步操作。

请参阅此小提琴和控制台输出(单击该行 2 次):http: //jsfiddle.net/quK3s/

你看,如果你添加一个新行,行 id 是“jqg1”,但实际上它插入了一个带有“jqg2”的行(用萤火虫检查,如果双击该行,请参阅控制台输出)

任何想法如何解决这个问题?或者它是一个错误?

正如我在这个问题https://stackoverflow.com/a/9218310/2221820中看到的那样,我认为该函数是错误的,它应该是预增量而不是$.jgrid.guid++.

有什么想法吗?

更新:

我最终使用了

但任何更好的解决方案/想法将不胜感激。

0 投票
1 回答
1145 浏览

performance - 使用 ROWID 和 ORA_ROWSCN 调整查询

我有一个以下查询,由于表非常大,因此需要花费大量时间,该查询还获取伪列 ROWID 和 ORA_ROWSCN。

我尝试使用提示 ALL_ROWS 并运行统计信息,但仍然没有太大帮助。请建议。提前非常感谢。

0 投票
1 回答
935 浏览

php - 在 html 页面上显示数据后获取 PHP 行索引

我正在使用 PHP 从 mysql DB 获取数据,然后将其显示在网页的 DIV 中。我获取的数据是任务列表,我希望用户能够在完成后删除任务。

图片在这里:
http
://www.picpaste.com/Tasks-esmvwRPX.jpg (显然我需要 10 个声望点才能在我的帖子中嵌入图片!)

这是我用来显示日期的 PHP 代码:

如何捕获显示的行的索引,以便对选定的任务执行删除查询?

我在 idTask 上有一个主键(未显示在任务列表中),我需要为我的删除语句捕获它。

任何帮助是极大的赞赏。

提前致谢。M。

0 投票
1 回答
829 浏览

java - Java + Oracle,ROWID 类型问题

我正在尝试使用 MyBatis 从我的 Java 应用程序中操作 Oracle DB,但我是 Oracle 的完整初学者......

这是 Oracle 选项卡:

然后我创建一个 Java 对象,其属性对应于表的列:

最后,我在 Mapper.xml 文件中构建了 SQL 查询:

但问题是查询在某处返回了一个 ROWID 对象,我无法弄清楚它是什么以及它来自哪里。