Results 1 to 3 of 3

Thread: sql

  1. #1
    Junior Member
    Join Date
    Oct 2007
    Answers
    3

    sql

    what is the difference between drop,truncate and delete commands?explain me with examples?

    Last edited by Mekalakn; 10-17-2007 at 04:26 AM.

  2. #2
    Junior Member
    Join Date
    Oct 2007
    Answers
    3

    Smile Re: sql

    Truncate

    this command will removes the data from the table
    for ex
    if u have a table with data if u give
    truncate table-name;
    command it removes the record Permanently

    Delete

    this command is same as truncate but Retrieves the data when we give rollback

    Drop


    this removes both data and struture of the table Permanently


  3. #3
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: sql

    DROP:- It removed the table from the database along with its data.

    TRUNCATE:-It deletes all the records from the table and dealocates all the resources . Data deleted by truncate can't be rolled back.

    DELETE:-It deletes the records from the table which can be rolled back .


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact