问题
How can I delete a particular row from the table in a SQLquery. I used primary key and Foreign key in this table. I am using Oracle 11G.
回答1:
its very simple, may be you need some reference: http://psoug.org/reference/delete.html
DELETE FROM table_name WHERE columnname= 'value';
回答2:
you asking to delete column Right?
update employee set city_name = '' where empid = '12'
Try this...
This will make the column to NULL
回答3:
Consider this example
You are having a table named cars columns are car_id, car_model, car_colour
car_id car_model car_colour
234 hyundai red
345 Nano white
565 Maruthi black
888 BMW brown
895 Audi Blue
234 hyundai red_blue
345 Nano white_yellow
565 Maruthi black_shade
888 BMW brown_king
895 Audi Blue_red
now here you want to delete the brown_king colour row, then you want to type the below query
delete from table_name where column_name = 'condition'
delete from cars where car_colour ='brown_king'
This will delete that particular row in this table.
来源:https://stackoverflow.com/questions/17082580/how-can-i-delete-a-particular-row-from-the-table-in-a-sqlquery