摘要: 假設有一TABLE, 包括一列自定義自動編號【規則為:前綴+日期+流水碼】且為主鍵,如果像平時用insert into 一筆一筆插入時,可以用默認值函數方式解決,但是當一次插入多筆資料,如 insert into tableName(....) select ... from otherTableName或 insert into tableName (....) select .... union select .....時會報key值重複的錯誤繞道解決方案為:在TABLE前加一個instead of insert的觸發器,這樣就插入成功,不會報錯 阅读全文
posted @ 2011-05-20 18:06 天际翔龙 阅读(407) 评论(0) 推荐(0) 编辑