Search notes:

SQL Server: drop table

Checking if table exists

If a table exists can be checked with object_id. Thus, it's possible to drop a table before it is (re-) created:
if object_id('tq84_tab', 'U') is not null drop table tq84_tab;

create table tq84_tab (
  id integer primary key,
  val varchar(10)
);

Using IF EXISTS

Checking for the existence of a table and droping it can be executed in one go:
DROP TABLE IF EXISTS tq84_tab;

See also

SQL: drop table

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758200704, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/SQL-Server/sql/drop/table/index(53): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78