你这个是数据库设计问题
select top 10 * from question where selectname="难" order by newid()
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~这些是什么意思?

解决方案 »

  1.   

    我的毕业设计也是这个题目,已经做的差不多了,你的问题我可以解决,我也有些问题请教你,请问你是那个大学的MM?我的QQ:149070264。
      

  2.   

    呵呵,楼主MM,你建的表中根本就没有selectname和newid这两个字段,请问你如何能从表中得到你要的数据???
      

  3.   

    现已用"select top 10 * from question where selectname="难" order by newid()"语句实现了随机组卷>>>即时有selectname和newid这两个字段,你每次运行这条语句结果通常会一样。又怎么实现随机组卷看样子你的毕业设计自己做是没戏了:)
      

  4.   

    are you kidding? 楼上的两位不要乱说啊.
    order by newid() can gurantee the result is random.newid will generate new value of guid type, and the result will be unique and random, it is a function! not a field!
      

  5.   

    the design of your table is terrible and inflexible.1. what if the question has 3 choices or 5 choices?
    2. what if i want display different feedback based on the choice user choosed?
    3. what if each choice will be graded differently
      (choise a: 5 point, choice b: 4 point, choice c: 3 point .....)
    4. what if I want questions of multiple reponse(answer) or fill in blank type?
    5. do you plan to support html code in your question and answers?by the way, the names of your fields are funny. Timu is pingying, answer is english, inconsistent.
      

  6.   

    可不要小看人吆,我的毕业设计包含:基础教程,典型例题,答疑论坛,聊天室,网上作业及在线测试 六个模块,在线测试只是我毕业设计的一个模块,现在我的设计只差这一个功能没实现了,所以我也不是太差吆!
       哦,昨天发帖太匆忙,漏写了!现更正如下:
        我在数据库中建的question表,该表有如下字段:id,timu,A,B,C,D,answer,selectname
        id:题目的自动编号;
        timu:存放题目;
        A,B,C,D:分别存放单选题的四个选项内容;
        answer:存放正确答案;
        selectname:存放试卷的难度系数    还有,"select top 10 * from question where selectname="难" order by newid()"语句可是高手指点的绝对正确,我已试过了!
      

  7.   

    请问newid()是个什么函数?可以实现随机功能?我以前搞随机都是用算法实现