I need to select random value from table and it should be distinct . I tried but I could not please help
this the query I have used but I got error say order by item must appear in the select list if select distinct is specified
- string checkentrycmd = "select distinct TOP(10) * from dbo.Quiz where MaID=" + Request.QueryString["Id"].ToString() + " ORDER BY CHECKSUM(NEWID())";

Tapan PatelRank #614 · 3.9K reputationPosted Sep 1, 2016, 7:27 AM EDT
Midhun TpRank #388 · 6.5K reputationPosted Sep 1, 2016, 7:35 AM EDT
Joma Rajab125 reputationPosted Sep 1, 2016, 9:54 AM EDT
Joma Rajab125 reputationPosted Sep 1, 2016, 10:17 AM EDT