sqlÖÐdropÓ÷¨
sql ÖÐµÄ drop Ó÷¨¿Éɾ³ý¹¤¾ß£¬°üÀ¨±í¡¢Ë÷Òý¡¢ÊÓͼ¡¢´æ´¢Àú³ÌºÍ´¥·¢Æ÷¡£ÆäÓ﷨Ϊ£ºdrop [object type] object_name¡£object_name ΪҪɾ³ýµÄ¹¤¾ßµÄÃû³Æ£¬ÆäÖÐ object_type Ϊ¹¤¾ßÀàÐÍ£¬ÀýÈç table¡¢index¡¢view µÈ¡£
SQL ÖÐµÄ DROP Ó÷¨
DROP ÏÂÁî¸ÅÊö
DROP ÏÂÁîÓÃÓÚÔÚ SQL Êý¾Ý¿âÖÐɾ³ý¹¤¾ß£¬ÀýÈç±í¡¢Ë÷Òý¡¢ÊÓͼ¡¢´æ´¢Àú³ÌºÍ´¥·¢Æ÷¡£
Óï·¨
DROP [OBJECT TYPE] object_name;
µÇ¼ºó¸´ÖÆ
ÆäÖУº
OBJECT TYPE Ö¸¶¨ÒªÉ¾³ýµÄ¹¤¾ßÀàÐÍ£¬ÀýÈç TABLE¡¢INDEX¡¢VIEW µÈ¡£
object_name ÊÇҪɾ³ýµÄ¹¤¾ßµÄÃû³Æ¡£
Ó÷¨
DROP TABLE
ɾ³ý±í¼°ÆäËùÓÐÊý¾ÝºÍË÷Òý¡£
DROP TABLE table_name;
µÇ¼ºó¸´ÖÆ
DROP INDEX
ɾ³ýË÷Òý¡£
DROP INDEX index_name;
µÇ¼ºó¸´ÖÆ
DROP VIEW
ɾ³ýÊÓͼ¡£
DROP VIEW view_name;
µÇ¼ºó¸´ÖÆ
DROP PROCEDURE
ɾ³ý´æ´¢Àú³Ì¡£
DROP PROCEDURE procedure_name;
µÇ¼ºó¸´ÖÆ
DROP TRIGGER
ɾ³ý´¥·¢Æ÷¡£
DROP TRIGGER trigger_name;
µÇ¼ºó¸´ÖÆ
×¢ÖØÊÂÏî
ÔÚɾ³ý¹¤¾ß֮ǰ£¬È·±£Äú²»ÔÙÐèÒªËü¡£
ɾ³ý±íʱ£¬Ò²»áɾ³ý±íÖеÄËùÓÐÊý¾Ý¡£
DROP ÏÂÁî²»¿ÉÄ棬һµ©Ö´ÐУ¬ÔòÎÞ·¨»Ö¸´ÒÑɾ³ýµÄ¹¤¾ß¡£
ÈôÊǹ¤¾ßÓÐÍâ¼üÔ¼Êø£¬Ôò±ØÐèÏÈɾ³ýÍâ¼ü»òÐÞ¸ÄÍâ¼üÒýÓá£
ÔÚɾ³ýÊÓͼ¡¢´æ´¢Àú³Ì»ò´¥·¢Æ÷ʱ£¬»¹±ØÐèɾ³ý¶ÔËüÃǵÄÒÀÀµÏî¡£
ÒÔÉϾÍÊÇsqlÖÐdropÓ÷¨µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡