Results 1 to 3 of 3

Thread: easy sql question

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Location
    UK
    Posts
    300
    Hi
    How do you write the sql to empty all the contents of a particular field in a table.

    I have a table called customers with name , address , and rep. I want to sql and empty all the rep entries and leave them blank but still retain all the name and addresses


    thx, locutus
    Resistance is futile

  2. #2
    Addicted Member Nice's Avatar
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    144
    sSql="Update tablename set field1=NULL where condition"

  3. #3
    Fanatic Member faisalkm's Avatar
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    752
    update customers set rep=Null

    Pls make sure that the Field is configured to accept Null values
    Faisal Muhammed
    Homepage:I Started making it in 1994 ...Still Under Construction
    Using

    Visual Basic 6.0 Enterprise SP5
    Embedded Visual Basic 3.0
    SQL Server 2000
    Windows 2000 Proff
    Delphi 6.0


    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width