How can one delete field contents using T-SQL?

  • Hello everyone!

    I have an SQL 2K table and in a particular field I wish to delete the contents of such a field by overwriting such a field with non-valid data such as "No data here" How can one do this using T-SQL? Any help would be much appreciated.

    Many thanks

    Pierre

     

     

  • You meant you wanted to update the field with 'No Data here' ?

    UPDATE TableA SET Field1 = 'No Data here'

  • you should set the fields to null rather than your 'no data' string

    www.sql-library.com[/url]

  • I agree use NULL and not a fixed value. You can work with it in your app just the same. However, what determines the validity of the data as this may make some additional difference in the answer you really need.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply