摘要:
今天我在看公司项目的时候看到了一行代码有两个??当时我就纳闷了不知道为什么用两个问号,这个是我这么久才遇到的这个问题,我百度了一下幸好有人也遇到了他是这样解释的1int a = x ?? y;意思就是 x 如果是null的話,a 就會等於 y,同等於1int a = (x == null ? y : x); 阅读全文
摘要:
答:解1: select top 10 * from A where id not in (select top 30 id from A) 解2: select top 10 * from A where id > (select max(id) from (select top 30 id from A )as A)首先就拿解1来select top 10 * from A表示取出前十条的数据select top 30 id from A表示取出前30条的数据现是取出大于30条的数据并且在取出大于10条的数据并且这个1条的数据是在30条数据之外的数据也就是说31-41之间的数据 阅读全文