我如何选择从我的这个表只显示一次数据,即使有多个


How do i select from this table of mine to display only once the data even there is multiple of them?

 question_id  question_text   field_name     lo_category             lo_domain  
      1        Build a tree     Build        Application             Cognitive 
      2        Build a tree     Build        Origination             Psychomotor 
      3        Build a tree     Build        Complex overt response  Psychomotor 
      4        describe the..  describe      Knowledge               Cognitive 

我如何从这个表中选择只显示不相同的question_text ?它实际上是一个搜索结果,我必须存储在这个表中。"建造一棵树"输入一次,但有3个结果。所以我想知道输入的问题的数量,并显示从这个表中输入的问题。

 EG
    Questions
    Build a tree
    describe the..

你可以这样写

SELECT * FROM table GROUP BY question_text;

但问题是,具有相同名称的第一行将首先显示。

如果您只想获得question_text。你可以这样做。

SELECT question_text FROM table GROUP BY question_text;
SELECT DISTINCT(question_text) FROM table;