SQL with Jupyter Notebook Tutorial

21 / 61

Deleting data from a table

  • One or more rows of a table can be deleted with 'delete' command to get rid of the data which is no more needed.

  • Delete operation will reduce the number of rows in the table which may help in faster select/insert/update on the table.

Syntax:

delete from table_name [where clause]
INSTRUCTIONS

Let us delete the rows whose depstreet value is Daker Street.

%%sql
delete from deptt_<<your lab username>> where depstreet = 'Daker Street';

Let us see the resultant table:

%%sql
select * from deptt_<<your lab username>>;

No hints are availble for this assesment

Answer is not availble for this assesment


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...