diff --git a/lib/sql.js b/lib/sql.js index 58fd61b..bc37452 100644 --- a/lib/sql.js +++ b/lib/sql.js @@ -87,7 +87,7 @@ var sql = { insertQuery: function (collectionName, data) { var tableName = collectionName; - return 'INSERT INTO ' + tableName + ' (' + sql.attributes(collectionName, data) + ')' + ' VALUES (' + sql.values(collectionName, data) + '); SELECT @@IDENTITY AS [id]'; + return 'INSERT INTO ' + tableName + ' (' + sql.attributes(collectionName, data) + ')' + ' VALUES (' + sql.values(collectionName, data) + '); SELECT SCOPE_IDENTITY() AS [id]'; }, // Create a schema csv for a DDL query