MSSQL2000»ò2005Êý¾Ý¿â£¬²éѯijÊý¾Ý¿âËùÓбíÃû£¬Ê¹ÓÃÒÔÏÂÃüÁî¼´¿É£»
Êó±êÓÒ¼üµã»÷Êý¾Ý¿â£¬´¦Àí²Ëµ¥£¬Ñ¡Ôñн¨²éѯ£¬ÔÚ²éѯ¿òÀÊäÈëÒÔÏÂÄÚÈÝ£¬
select Name + '''' from sysobjects where xtype=''U'' order by name asc
È»ºó°´F5¼ü£¬Ö´ÐУ¬¾Í»áÁгöËùÓбíÃû£¬¿ÉÒÔ¸´ÖƱ£´æ£»
Òò´Ë£¬Èç¹ûÖ´ÐÐÏÂÁвéѯÃüÁîÐУ¬
select ''truncate table '' + Name + '''' from sysobjects where xtype=''U'' order by name asc
¸ÃÌõÓï¾äÖ´ÐÐÖ®ºó»á½«Êý¾Ý¿âÖÐËùÓÐµÄ±í¶¼²éѯ³öÀ´£¬²¢¼ÓÉÏÃüÁîǰ׺truncateÓï¾ä£¬È«²¿¸´ÖƳöÀ´Ö®ºóÖ´ÐиÃtruncateϵÁÐÓï¾ä£¬¼´¿Éɾ³ýÏàÓ¦ËùÓбíµÄÊý¾Ý¡£µ±È»£¬²»Ïëɾ³ýµÄɾ³ý¸ÃÐм´¿É¡£ |