use base
goselect name
from sysobjects
where type="U"
  and name like "question%"得到的结果集就是base里所有的以question开头的表了。
遍历它,一个一个地删除之:
drop table tablename
...

解决方案 »

  1.   

    sorry,看错了,MySQL没有这些功能.
    我想,你可以用show tables;来获得所有的表名。
    用重定向把结果方到一个文件里。
    然后在java中读这个文件,遍历它,删除相关的表。
      

  2.   

    mysql好像不支持go。
    你可以用正则表达式。
    返回该库中所有的表名,然后判断开头是question的就drop table tbl_name
      

  3.   

    php中是这样做的:
    <?php
        $dbname = 'mysql_dbname';    if (!mysql_connect('mysql_host', 'mysql_user', 'mysql_password')) {
            print 'Could not connect to mysql';
            exit;
        }    $result = mysql_list_tables($dbname);
        
        if (!$result) {
            print "DB Error, could not list tables\n";
            print 'MySQL Error: ' . mysql_error();
            exit;
        }
        
        while ($row = mysql_fetch_row($result)) {
           if(ereg("^[question]$",$row[0]))
           {
             $sql = "drop table ".$row[0]."";
             $result = mysql_query($sql);
        }    mysql_free_result($result);
    ?>
      

  4.   

    已经作出来了
    用resultset,
    show tables
    返回所有的表名
    不用存到文件中
    感谢二位