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....
+ Reply to Thread
Results 1 to 4 of 4
-
-
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. -
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.)
Similar Threads
-
Microsoft SQL Server need in Vegas Pro 11?
By videobread in forum EditingReplies: 5Last Post: 11th Dec 2011, 22:11 -
Video conversion queries
By AussieTuca in forum Video ConversionReplies: 3Last Post: 16th Aug 2011, 19:01 -
Microsoft SQL Server, can I uninstall it?
By alegator in forum ComputerReplies: 3Last Post: 27th Jun 2010, 23:14 -
Ulead Movie Factory queries
By Mark Wynn in forum Authoring (DVD)Replies: 2Last Post: 11th Apr 2010, 20:42 -
new chinese sql website attack has begun
By aedipuss in forum ComputerReplies: 4Last Post: 15th Nov 2008, 16:53