/**
 * answer相关视图
 * create time: 2011-5-31 下午03:33:45
 * @version $Id: db.views.sql 32 2011-06-08 07:00:12Z liqt $
 * @author LiQintao
 */

DROP
    VIEW IF EXISTS v_answer_index_sort_newest
;
CREATE
    VIEW v_answer_index_sort_newest AS
        SELECT * FROM qa_answer ORDER BY a_answer_time DESC
;

DROP
    VIEW IF EXISTS v_answer_index_sort_score
;
CREATE
    VIEW v_answer_index_sort_score AS
        SELECT * FROM qa_answer ORDER BY a_score DESC, a_answer_time DESC
;