Computer Science, asked by ramalingeswararaovai, 2 months ago

Write a query to display unique student ID who joined in the month
of June. Sort the result in ascending order.​

Answers

Answered by Equestriadash
1

Assuming the table name to be Students and the column names to be Student_ID and DOJ, the query would be:

Select distinct Student_ID from Students where DOJ like '____-06-__' order by Student_ID;

  • Select is used to retrieve/display information from the table.
  • Distinct is a keyword used to eliminate redundant data from the table. This means that if there were two records with the same values, only one would be displayed.
  • Where is used to specify conditions.
  • Like is used for pattern-matching. Since we need records having June as the month, we can use wildcard characters to specify the unknown characters and specify the month where required.
  • Order by is used to specify the column by whose order the data needs to be sorted alphabetically/numerically, depending on the column's datatype.

By default, the data will be displayed in ascending order. To get it in descending order, simply type desc at the end of the query.

To know more about wildcard characters, refer to the link below:

brainly.in/question/40266524

Answered by seek19
9

Answer:

select distinct studid

from registration where doj like '%JUN%'

order by studid;

Explanation:

Similar questions