function truncate

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • khanhly
    New Member
    • May 2007
    • 1

    function truncate

    hi, everybody !

    how to different between drop table and truncate table ?

    thank you.
  • frozenmist
    Recognized Expert New Member
    • May 2007
    • 179

    #2
    Hi,
    What a drop table is does is, it functions as a table delete i.e; it ceases to exist in the data base.
    Whereas the truncate deletes all rows from the table.
    Is this enough?

    Cheers

    Comment

    • rsrinivasan
      New Member
      • Mar 2007
      • 221

      #3
      Originally posted by khanhly
      hi, everybody !

      how to different between drop table and truncate table ?

      thank you.
      Hi,
      I think you the difference between delete tables and truncate table. Right?

      1. Both will be used to delete rows from the table.
      2. TRUNCATE will delete all the rows from the table. Because we cant
      use "WHERE" clause in truncate statement.
      3. We can rollback the records which are deleted by "DELETE" commands.
      But We cant rollback the deleted records, if you deleted by
      using "TRUNCATE" commands.
      4. DELETE is DDL statement. But TRINCATE is DML statement

      Thanks,
      Srinivas r.

      Comment

      • rsrinivasan
        New Member
        • Mar 2007
        • 221

        #4
        Originally posted by khanhly
        hi, everybody !

        how to different between drop table and truncate table ?

        thank you.
        Hi,
        I think you want the difference between DELETE tables and TRUNCATE table. Right?

        1. Both will be used to delete rows from the table.
        2. TRUNCATE will delete all the rows from the table. Because we cant
        use "WHERE" clause in truncate statement.
        3. We can rollback the records which are deleted by "DELETE" commands.
        But We cant rollback the deleted records, if you deleted by
        using "TRUNCATE" commands.
        4. DELETE is DDL statement. But TRINCATE is DML statement

        Thanks,
        Srinivas r.

        Comment

        • sushjames
          New Member
          • May 2007
          • 7

          #5
          Originally posted by rsrinivasan
          Hi,
          I think you want the difference between DELETE tables and TRUNCATE table. Right?

          1. Both will be used to delete rows from the table.
          2. TRUNCATE will delete all the rows from the table. Because we cant
          use "WHERE" clause in truncate statement.
          3. We can rollback the records which are deleted by "DELETE" commands.
          But We cant rollback the deleted records, if you deleted by
          using "TRUNCATE" commands.
          4. DELETE is DDL statement. But TRINCATE is DML statement

          Thanks,
          Srinivas r.

          can anyone tell me how to recall the deleted data ?

          Comment

          • rsrinivasan
            New Member
            • Mar 2007
            • 221

            #6
            Originally posted by sushjames
            can anyone tell me how to recall the deleted data ?
            Hi,
            Just use "ROLLBACK" command.

            Thanks,
            Srinivas r.

            Comment

            Working...