首页 \ 问答 \ 如何在Oracle上使用JOIN使用“FOR UPDATE”?(How can I use “FOR UPDATE” with a JOIN on Oracle?)

如何在Oracle上使用JOIN使用“FOR UPDATE”?(How can I use “FOR UPDATE” with a JOIN on Oracle?)

另一个SO问题的答案是使用此SQL查询:

SELECT o.Id, o.attrib1, o.attrib2 
  FROM table1 o
  JOIN (SELECT DISTINCT Id 
          FROM table1, table2, table3 
         WHERE ...) T1 ON o.id = T1.Id

现在我想知道如何将此语句与关键字FOR UPDATE一起使用。 如果我只是将其附加到查询中,Oracle会告诉我:

ORA-02014:无法从视图中选择FOR UPDATE

我是否必须修改查询,或者是否有使用Oracle执行此操作的技巧? 使用MySql,语句可以正常工作。


The answer to another SO question was to use this SQL query:

SELECT o.Id, o.attrib1, o.attrib2 
  FROM table1 o
  JOIN (SELECT DISTINCT Id 
          FROM table1, table2, table3 
         WHERE ...) T1 ON o.id = T1.Id

Now I wonder how I can use this statement together with the keyword FOR UPDATE. If I simply append it to the query, Oracle will tell me:

ORA-02014: cannot select FOR UPDATE from view

Do I have to modify the query or is there a trick to do this with Oracle? With MySql the statement works fine.


原文:https://stackoverflow.com/questions/2586014
更新时间:2022-11-04 08:11

最满意答案

一般而言,对于调试,请使用调试器/ dom检查器逐步完成调试。 看看正在应用的CSS。 看看哪些CSS规则赢得了级联。 查看哪些CSS规则被删除为无效。

lefttop属性接受长度而不是数字。 您没有在值上放置任何单位。

(在怪癖模式下,有些浏览器认为99表示99像素 ,但并不意味着什么)。


In general terms, for debugging, step through it with a debugger / dom inspector. Look at the CSS being applied. Look at which CSS rules win the cascade. Look at which CSS rules are deleted as invalid.

The left and top properties accept lengths not numbers. You haven't put any units on the values.

(In quirks mode, some browsers think that 99 means 99 pixels when it doesn't mean anything).

相关问答

更多
  • 您没有从调用getImageData()的内存泄漏。 问题的根源在于这一行: TempImg.src = ImgCanvas.toDataURL("image/png"); 实际上,每次执行该代码行时,浏览器都会“下载”另一个图像并将其存储在内存中。 所以,你实际上最终得到的是一个快速增长的缓存。 您可以通过在Chrome中打开网站并检查开发人员工具的资源选项卡( ctrl+shift+i )轻松验证此情况。 您可以通过制作TempImgCanvas并将图像数据存储在该画布上而不是在每次调用updateim ...
  • required是一个反映的属性 (如id , name , type等),所以: element.required = true; ...其中element是实际的input DOM元素,例如: document.getElementById("edName").required = true; (只是为了完整。) 回覆: 然后属性的值不是空字符串,也不是属性的规范名称: edName.attributes.required = [object Attr] 这是因为在该代码中需要一个属性对象 ,而不 ...
  • 该页面使用excanvas - 一个使用IE的VML渲染器模拟canvas元素的JS库。 请注意,在Internet Explorer 9中, canvas标签本身是支持的 ! 有关详细信息,请参阅MSDN文档 ... The page is using excanvas - a JS library that simulates the canvas element using IE's VML renderer. Note that in Internet Explorer 9, the canvas ...
  • 查看SVGCanvas ,它定义了一个与HTML5画布兼容的API,可以从绘图命令创建SVG输出。 它可能无法处理所有内容,但您的简单示例应该可以正常工作。 只需将代码的相关位粘贴到左侧textareas中 ,然后单击“do it”,然后从右侧的textarea复制svg输出。 Check out SVGCanvas which defines an API compatible with HTML5 canvas that creates SVG output from the drawing comma ...
  • HTML5 Audio对象 您不需要打扰
  • 一般而言,对于调试,请使用调试器/ dom检查器逐步完成调试。 看看正在应用的CSS。 看看哪些CSS规则赢得了级联。 查看哪些CSS规则被删除为无效。 left和top属性接受长度而不是数字。 您没有在值上放置任何单位。 (在怪癖模式下,有些浏览器认为99表示99像素 ,但并不意味着什么)。 In general terms, for debugging, step through it with a debugger / dom inspector. Look at the CSS being appl ...
  • 我的第一个问题是:document.createElement()和document.createElementNS()函数是否存储它们在文档对象中的某个位置返回的节点对象? 不,实现可能会在内部执行类似的操作,但没有类似的内容暴露在外部。 是否可以创建一个独立于特定文档对象的元素节点对象(可能使用名称空间),然后将其附加到某个文档对象的文档树中? 这个问题的答案也是否定的:通常,每个元素都绑定到用于创建它的文档对象,该对象由ownerDocument属性引用。 第三,是否可以使用给定的文档对象docume ...
  • 对于克隆DOM节点,请使用cloneNode 。 为了调试代码使用jsfiddle,社区可以帮助您发现点击问题 你的代码中有很少的bug。 更正后的版本: function CircleCoordinates() { CircleOptions.left = CircleOptions.posBall.x - CircleOptions.radius, CircleOptions.right = CircleOptions.posBall.x + CircleOptions.radius, ...
  • DOM节点与任何其他JS对象没有太大的不同。 如果他们没有任何参考,他们应该收集垃圾。 也就是说可能有隐含的引用。 如果它正在播放音频文件,例如浏览器本身可能会引用它以便维护播放器。 因此,只要音频元素完全停止和解除引用,它就会自动清理。 我想你是在想这个。 DOM nodes aren't much different than any other JS object. If they don't have any references to them, they should get garbage c ...
  • 如前所述,没有“事件”,但有人已经编写了一个方法来“检测DOM元素是否真正可见”(标题)。 它不需要JQuery。 您可能希望检查多个事件的值,例如文档加载,滚动或窗口调整大小。 As already mentioned, there is no "event" but someone already wrote a method to "detect if a DOM Element is Truly Visible" (the title). It doesn't require JQuery. You ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)