An SQL VIEW is a "virtual table" -- it is like specifying a SELECT query containing fields from one or more tables in the database, but a VIEW is stored like a table in the database structure. Views offer a convenient way to allow the end-user to access some information, while protecting others. They can also be used to join two tables in your database and present the underlying data as if the data were coming from a single table.
VIEWs are supported in INM VizionDB, by using SQL statements CREATE VIEW and DROP VIEW with the Database method SQLExec().
sqlStmt = "CREATE VIEW NYOffice AS SELECT employee_no, first_name, last_name FROM employee WHERE city = ‘ New York '"
To delete a view you use the SQL statement DROP VIEW, but in order to delete it the view must not be in use. Therefore, if you have a Recordset member that accesses the view, you need to call member(“RS_NYOffice”).Clear(). Then you can call the database method SQLExec() as follows:
member("DB_Employees").SQLExec("DROP VIEW NYOffice")