Danny's profile季节的水滴PhotosBlogListsMore Tools Help

Blog


    10/5/2009

    为什么在Oracle里删除了表数据,但空间却得不到释放

    Q: 为什么我在Oracle下Delete Table,但是表空间却得不到释放?
    A: 学习一下Delete和Truncate的区别:
        1. 当使用Delete语句删除表的所有数据时,不会释放表所占用的空间;使用"Truncate Table"语句不仅会删除表的所有数据,而且还会释放表段所占用的空间;
        2. Delete属于DML(Data Manipulation Language)操作,支持事务;Truncate属于DDL(Data Definition Language)操作,不支持事务;
        3. Delete语句的操作可以回退,但Truncate Table语句的操作不能回退。

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Trackbacks

    The trackback URL for this entry is:
    http://think4v.spaces.live.com/blog/cns!B7E9CA656247B821!1009.trak
    Weblogs that reference this entry
    • None