asked on
Is this delete statement correct as in syntax if wanted to delete all the records
delete * from <TableName>
Im getting an error on ExecuteNonQuery() and errmessage = "Incorrect syntax near '*'."
if (rsBackup.RecordCount > 0)
{
stgSQL = "DELETE * FROM SalesTaxCombos";
DbCommand TempCommand = mdlG3Config.gdbTarget.Connection.CreateCommand();
TempCommand.CommandText = stgSQL;
UpgradeHelpers.DB.DbConnectionHelper.ResetCommandTimeOut(TempCommand);
TempCommand.Transaction = UpgradeHelpers.DB.TransactionManager.GetCurrentTransaction(mdlG3Config.gdbTarget.Connection);
TempCommand.ExecuteNonQuery();
ASKER
ASKER
Databases are organized collections of data, most commonly accessed through management systems including schemas, tables, queries and processes that allow users to enter and manipulate the information or utilize it in other fashions, such as with web applications or for reporting purposes.
TRUSTED BY
Delete from <tablename>
This will delete entire rows unless restricts through a where clause.