是分别排序还是一起排序?
order by 都可以实现把

解决方案 »

  1.   

    不需要转换 order by date1,time1,no
      

  2.   

    要求对表table1中的三个字段date1,time1,no进行升序排列,如何写SQL语句?
    (其中date1,time1为字符型数据,排序时需要对date1,time1进行转换成数值型才能排序吗?)
    ======
    order by date1,time1,no
    排序时不需要转换
      

  3.   

    做个测试就知道了
    create table tmp(date1 varchar(20),time1 varchar(20),no int)
    insert tmp select '2007-05-01','2007-05-02',2
    union all select '2007-05-02','2007-05-02',3
    union all select '2007-04-30','2007-05-01',1select * from tmp order by date1,time1,nodrop table tmpdate1                time1                no          
    -------------------- -------------------- ----------- 
    2007-04-30           2007-05-01           1
    2007-05-01           2007-05-02           2
    2007-05-02           2007-05-02           3(所影响的行数为 3 行)