3

To drop a column of a table, you use the DROP COLUMN clause in the ALTER TABLE statement as follows:

ALTER TABLE res_partner rs 
DROP COLUMN rs.miss_schedule;

ERROR: syntax error at or near "rs" LINE 1: ALTER TABLE res_partner rs

4
  • "not working" is not a valid Postgres error message. The syntax most definitely works: dbfiddle.uk/… Commented Jun 3, 2021 at 7:55
  • ALTER TABLE res_partner rs DROP COLUMN rs.miss_schedule; Commented Jun 3, 2021 at 8:02
  • ERROR: syntax error at or near "rs" LINE 1: ALTER TABLE res_partner rs Commented Jun 3, 2021 at 8:03
  • You can't use aliases in a DDL statement like that. Commented Jun 3, 2021 at 8:05

1 Answer 1

6

Try this query with no alias

ALTER TABLE res_partner DROP COLUMN miss_schedule;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.