websql drop column with javascript [英] websql drop column with javascript

查看:103
本文介绍了websql drop column with javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用javascript删除websql数据库中的列。我尝试了以下但没有成功:

I'm trying to delete a column in a websql database with javascript. I have tried the following with no success:

db.transaction(
    function(transaction) {           
        transaction.executeSql('ALTER TABLE log_entries DROP COLUMN name;');
    }
);

其中,name是我要从表log_entries中删除的列。

where, name is the column I want to delete from the table log_entries.

有人可以告诉我如何用javascript删除websql数据库中的列吗?

Could someone please advise me how I would go about deleting a column in a websql database with javascript?

推荐答案

在Web SQL中没有实现删除字段。
我正在解决这个问题。方法之一 - 数据转储和删除表。然后使用新字段恢复表。从转储中恢复数据

In the Web SQL is not implemented removing fields. 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

这篇关于websql drop column with javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆