Infosys interview question

Related to SQL Table printing program upto 100