MSSQL Create() fix: Add LastInsertIDReturningSuffix to dialect

Per https://github.com/denisenkom/go-mssqldb/issues/355
This commit is contained in:
Alex Stockwell 2019-10-04 16:28:04 -07:00
parent 81c17a7e25
commit 5cdd048ba9

View File

@ -191,7 +191,7 @@ func (mssql) SelectFromDummyTable() string {
}
func (mssql) LastInsertIDReturningSuffix(tableName, columnName string) string {
return ""
return "SELECT id = convert(bigint, SCOPE_IDENTITY())"
}
func (mssql) DefaultValueStr() string {