home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / sql / delete.shr < prev    next >
Text File  |  1988-02-29  |  1KB  |  61 lines

  1.          
  2.  
  3.  
  4.  
  5.  
  6.  
  7.          DELETE
  8.  
  9.  
  10.          The delete command deletes rows from your table.
  11.  
  12.          SYNTAX:
  13.  
  14.          DELETE table_name
  15.          [WHERE search_expression]
  16.  
  17.          Refer to the section on the select command for details on the 
  18.          where clause.  The basic difference between the select and the 
  19.          delete is that with select, the rows are displayed, and with 
  20.          delete, the rows are deleted.  Because of this, it is a smart 
  21.          idea to do a select before you do a delete so you can see the 
  22.          rows that you are going to delete.
  23.  
  24.          You can only delete complete rows.  If you want to delete column 
  25.          data within a row, use the update command.
  26.  
  27.          EXAMPLES:
  28.  
  29.          Delete all data from the cust table.
  30.  
  31.          delete cust;
  32.  
  33.          Delete customers from the cust table whose rating is less than 10.
  34.  
  35.          delete cust
  36.          where rating < 10;
  37.  
  38.          
  39.  
  40.          HOW TO RESTORE DATA YOU HAVE JUST DELETED
  41.  
  42.          Type it in again!!! (Therefore be very careful when you use this 
  43.          command).
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.                                    DELETE-1
  60.  
  61.