index can increse the searching speed. sometimes 20 times faster.alias just shorten the sql statement.

解决方案 »

  1.   

    用别名可以使sql语句更清晰,书写更简洁、方便。
      

  2.   

    alias:suppose you have two tables.
    T001_user_information(id, firstname,secondname,...)
    T002_business_information(id, firstname, secondname, ...)now select id when user and business has the same firstname and secondname, just for testing.if you do not use alias, it would beselect T001_user_information.id, T002_business_information.id
    from T001_user_information, T002_business_information
    where T001_user_information.firstname=T002_business_information.firstname
      and T001_user_information.secondname=T002_business_information.secondnameif you use alias, it would beselect t1.id, t2.id
    from T001_user_information t1, T002_business_information t2
    where t1.firstname=t2.firstname
      and t1.secondname=t2.secondnamejust a bit short. nothing else