Shweta68

Shweta68

  • 1.6k
  • 100
  • 8.4k

select 100 questions at a time of 5 different subjects

Aug 31 2018 4:58 AM
Hi all,
 
i have 5000 quetions saved in a table. I want to select 100 questions at a time of 5 different subjects. For every student questions must not same. table structure is :
 
CREATE TABLE [dbo].[tbl_questions](
[question_id] [int] IDENTITY(1,1) NOT NULL,
[question] [nvarchar](2000) NULL,
[option1] [nvarchar](500) NULL,
[option2] [nvarchar](500) NULL,
[option3] [nvarchar](500) NULL,
[option4] [nvarchar](500) NULL,
[Answer] [nvarchar](50) NULL,
[subject] [int] NULL
) ON [PRIMARY]
 
I need 20 quetions of each subject

Answers (2)