您好,欢迎访问一九零五行业门户网

读取MYSQL数据库中某个表的第一行和最后一行数据_MySQL

读取第一行
         select * frommytable order byidasc limit 0,1
读取最后一行
           select * from mytable order by id desclimit 0,1
读取前100行
          select * from mytable order byidasc limit 0,100
mytable即是要读取的表名,id是要排序的对象。
其它类似信息

推荐信息