VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Member
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Can someone here tell me the SQL command to delete data from a certain field of a table, in all rows of that table?

    In other words, say there are 100 rows/records in a table and there's a column/field in that table called Name. I want to delete the Name from every row. But I don't want to remove the field itself....
    Quote Quote  
  2. Delete(rec=1,200: field=name,all)
    Corned beef is now made to a higher standard than at any time in history.
    The electronic components of the power part adopted a lot of Rubycons.
    Quote Quote  
  3. Member
    Join Date
    Aug 2008
    Location
    Canada
    Search Comp PM
    The DELETE command in SQL would delete the entire row, which is not what you want. If you want to just clear the values in the field without deleting the entire row, then you should use the UPDATE SQL command.

    Let's say your table is called MYTABLE, with the field called Name in it. While syntax can vary between flavors of SQL, generally the following should work. The syntax to empty the field values is:

    UPDATE "MYTABLE"
    SET "Name" = NULL

    If that command generates an error because of the NULL keyword, try:

    UPDATE "MYTABLE"
    SET "Name" = '' (This last '' is two single quotes. The others are double quotes.)
    Quote Quote  
  4. Member
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Thank you
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!