Postgresql statement that will insert set value to True

Posted on 2010-01-03
Last Modified: 2012-05-08
Dear Experts,

I need a simple statement that will set the value of the entire column called updatedinfo in a table called allusers to TRUE?

Question by:Joel_Sisko
    LVL 26

    Accepted Solution

    UPDATE allusers
    SET updatedinfo = 'TRUE'

    and if you want to add some conditions also add a

    WHERE userID = xxx

    clause. Of course you should modify the where condition...
    LVL 7

    Assisted Solution

    if the updatedinfo is a BOOL column or NUMBER(1) do

    update allusers set  updatedinfo = 1;


    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
    PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
    Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now