public function Truncate::execute in Drupal driver for SQL Server and SQL Azure 4.1.x
Same name and namespace in other branches
- 4.2.x src/Driver/Database/sqlsrv/Truncate.php \Drupal\sqlsrv\Driver\Database\sqlsrv\Truncate::execute()
- 3.1.x src/Driver/Database/sqlsrv/Truncate.php \Drupal\sqlsrv\Driver\Database\sqlsrv\Truncate::execute()
- 4.0.x src/Driver/Database/sqlsrv/Truncate.php \Drupal\sqlsrv\Driver\Database\sqlsrv\Truncate::execute()
Executes the TRUNCATE query.
Return value
Return value is dependent on whether the executed SQL statement is a TRUNCATE or a DELETE. TRUNCATE is DDL and no information on affected rows is available. DELETE is DML and will return the number of affected rows. In general, do not rely on the value returned by this method in calling code.
Overrides Truncate::execute
See also
https://learnsql.com/blog/difference-between-truncate-delete-and-drop-ta...
File
- src/
Driver/ Database/ sqlsrv/ Truncate.php, line 17
Class
- Truncate
- General class for an abstracted TRUNCATE operation.
Namespace
Drupal\sqlsrv\Driver\Database\sqlsrvCode
public function execute() {
return $this->connection
->query((string) $this, [], $this->queryOptions);
}