我使用此查询删除roman&来自表格的印地文colunn值。
DELETE s.hindi, s.roman from song s where name=X;
错误:Unknown table 'hindi' in MULTIDELETE.
答案 0 :(得分:6)
您不删除列值,只能删除整行。
DELETE
查询的语法是
DELETE FROM table_name [ WHERE conditions ]
例如
DELETE FROM song WHERE name = 'X';
您可以从表中删除列,但我不确定这是否是您想要的
ALTER TABLE song DROP COLUMN hindi, DROP COLUMN roman;
您还可以更新特定列。如果您希望它们为空并且您的设计允许它,请使用NULL
UPDATE song SET hindi = NULL, roman = NULL WHERE name = 'X';