预发布:2024-07-17
runSql ("CREATE VIEW AlbertaAddresses AS SELECT * FROM sakila.address WHERE district = 'Alberta'");
//check TABLES for successful CREATE VIEW
runSql ("SHOW TABLES LIKE 'AlbertaAddresses' ",
(ResultSetData) => {
print(ResultSetData);
}
);
输出是
[ { "Tables_in_sakila (AlbertaAddresses)": "albertaaddresses" } ]
runSql ("DROP VIEW IF EXISTS albertaaddresses");
//check TABLES for successful DROP VIEW
runSql ("SHOW TABLES LIKE 'A%' ",
(IResultSetData) => {
print(IResultSetData);
}
);
输出是
[ { "Tables_in_sakila (A%)": "actor" }, { "Tables_in_sakila (A%)": "actor_info" }, { "Tables_in_sakila (A%)": "address" } ]