[![在此处输入图片说明] [1]] [1]我需要以下查询的帮助。
select *
from xr.ObjectPropertyvalue
where objectid in (
select objectid
from xr.objectpropertyvalue
where endversion in
(select max(endversion)
from xr.ObjectPropertyValue
group by objectid having count(endversion) > 1
)
)
我想要做的是在桌面上查找具有最高版本且objectid是唯一的条目。
Ex.
Object id 1's highest version = 3
Object id 2 highest version =4
任何帮助都将不胜感激。
答案 0 :(得分:0)
如果我理解正确,您可以尝试此查询(未经测试,我现在没有sql-server环境)
import UIKit
class Parent {
var child:Child?
deinit {
print("deinitialized")
}
}
class Child {
weak var parent: Parent?
deinit {
print("deinitialized")
}
}
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let child = Child()
let parent = Parent()
child.parent = parent
parent.child = child // strong reference cycle created
}
}