CREATE OR REPLACE VIEW sql error CREATE OR REPLACE VIEW sql error sqlite sqlite

CREATE OR REPLACE VIEW sql error


SQLite does not support the CREATE OR REPLACE syntax. The only database that I know which supports that syntax is Oracle, but I am guessing there are others.

Drop the view and create it with the new definition:

DROP VIEW IF EXISTS [vtable]; -- "OR REPLACE"CREATE VIEW [vtable] AS SELECT * FROM Files_Table ORDER BY File;


I ran into the same error when using CREATE OR REPLACE in MS SQL Server. The following worked for me:

ALTER VIEW [vtable] ASSELECT *FROM Files_TableORDER BY File;