TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Joma Rajab
NA
110
51.7k
How make order random and distinct in sql query
Sep 1 2016 11:03 AM
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())"
;
Reply
Answers (
4
)
Why SQL server used with ASP.NET mostly
DataSet/SqlDataReader with DataList