Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ec3ae16

Browse files
committed
mssql: fix sp_MSforeachtable parameter
1 parent 9f282f4 commit ec3ae16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

database/mssql/mssql.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ func (ss *MSSQL) Drop() error {
300300
}
301301

302302
// drop the tables
303-
query = `EXEC sp_MSforeachtable 'DROP TABLE @p1'`
303+
query = `EXEC sp_MSforeachtable 'DROP TABLE ?'`
304304
if _, err := ss.conn.ExecContext(context.Background(), query); err != nil {
305305
return &database.Error{OrigErr: err, Query: []byte(query)}
306306
}

0 commit comments

Comments
 (0)