又是怕癡呆,趕快記下來。

IDENT_CURRENT: 取出 identity 欄位的目前值

IDENT_INCR: 取出 identity 欄位的漸增值

IDENT_SEED: 取出 identity 欄位的起始種子

使用方式如下:

select IDENT_CURRENT('test')

SELECT IDENT_SEED('test')

這樣可以取出該 table_name table 中的 identity 欄位的目前值, 而下一個呢? 可以利用:

select IDENT_CURRENT('test') + IDENT_INCR('test')


arrow
arrow
    全站熱搜

    flywang 發表在 痞客邦 留言(0) 人氣()