[英]websql drop column with javascript
I'm trying to delete a column in a websql database with javascript. 我正在尝试使用javascript删除websql数据库中的列。 I have tried the following with no success:
我尝试了以下方法,但均未成功:
db.transaction(
function(transaction) {
transaction.executeSql('ALTER TABLE log_entries DROP COLUMN name;');
}
);
where, name is the column I want to delete from the table log_entries. 其中,name是我要从表log_entries中删除的列。
Could someone please advise me how I would go about deleting a column in a websql database with javascript? 有人可以告诉我如何使用javascript删除websql数据库中的列吗?
In the Web SQL is not implemented removing fields. 在Web SQL中,未实现删除字段。 I'm currently working on this problem.
我目前正在解决这个问题。 One of way - data dump and remove the table.
一种方式-数据转储并删除表。 Then restore the table with the new fields.
然后使用新字段还原表。 Restore the data from the dump
从转储中还原数据
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.