我在VS代码编辑器中输入如下PostgreSQL代码,如下所示,VS代码在“ RENAME”附近显示“语法错误。我应该忽略它吗?”
CREATE TABLE flight (
id SERIAL PRIMARY KEY,
origin VARCHAR NOT NULL,
destination VARCHAR NOT NULL,
duration INTEGER NOT NULL
);
-- Rename table
ALTER TABLE flight
RENAME TO flights;
我正在练习如何重命名表,例如:http://www.postgresqltutorial.com/postgresql-rename-table/