Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 889609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:35:40+00:00 2026-05-15T13:35:40+00:00

I am attempting to create a View in PhpPgAdmin (PostGreSQL db) which has the

  • 0

I am attempting to create a View in PhpPgAdmin (PostGreSQL db) which has the following SQL statement:

DELETE FROM myTable WHERE myTable.error IS NULL;

PhpPgAdmin gives me the following error:

ERROR: syntax error at or near “DELETE” at character 59
In statement:
CREATE OR REPLACE VIEW “Schema1″.”Delete empty errors” AS DELETE FROM myTable WHERE myTable.error IS NULL;

As far as I can tell this SQL statement is valid, and I have delete privileges for the table. Is the DELETE statement not allowed in Views? Any ideas what I am doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T13:35:41+00:00Added an answer on May 15, 2026 at 1:35 pm

    Views are used to display the data from SELECT statements only (usually when the SELECT is complex). Views cannot contain DELETES, UPDATES, or INSERTS.

    Perhaps you want a function?

    EDIT: As OMG Ponies points out, you can have updateable views, but thats where you would issue a DELETE to an existing view and then use a RULE to rewrite the query as a DELETE.

    And please, please don’t wrap a function call to do a DELETE as a side effect in a view. Its unexpected and Jesus shoots a puppy every time this happens.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 496k
  • Answers 496k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer String result = MessageFormat.format(htmlString, "foo", "bar", "larodi"); String[] paramas =… May 16, 2026 at 11:44 am
  • Editorial Team
    Editorial Team added an answer This should work: I18n.locale = 'es' May 16, 2026 at 11:44 am
  • Editorial Team
    Editorial Team added an answer You are using an id selector, but the element you… May 16, 2026 at 11:44 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am attempting to create a strongly typed view with a MVC View User
I've got the following line, attempting to create a mock of a concrete type:
I'm attempting to create themeing system for my asp.net mvc application. I was able
I am attempting to create a custom Adapter for my ListView since each item
I am attempting to create a form where a user is able to enter
I am attempting to create a simple application using Eclipse GEF that displays a
I'm attempting to create a hierarchal menu system in rails. My menu model is
I'm attempting to create a RESTful service in CakePHP but I've hit a bit
I'm attempting to create a web application with TweetSharp that will connect to Twitter
I am attempting to implement a custom view. This view should display an image

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.