Search notes:

SQLite: drop view

Dropping a view only if it exists

In order to suppress error messages, SQLite supports the drop view if exists clause which only tries to drop a view if it in fact does exist:
create view tq84_vw as
  select 'foo';

drop view if exists tq84_vw;

drop view if exists tq84_vw;
Github repository about-sqlite, path: /views/drop_if_exists.sql
See als Dropping a table only if it exists

See also

view

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...', 1758206436, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/SQLite/views/drop(49): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78