Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (45k points)
a. Null values are displayed last in the ascending sequences.

b. Data values are displayed in descending order by default.

c. You cannot specify a column alias in an ORDER BY clause.

d. You cannot sort query results by a column that is not included in the SELECT list.

e. The results are sorted by the first column in the SELECT list, if the ORDER BY clause is not provided.

2 Answers

0 votes
by (99k points)

The correct answer is, option (a): Null values are displayed last in the ascending sequences. And rest all are incorrect answers pertaining to SQL. Wish to be an expert in SQL? Check out the SQL course from Intellipaat, to help you get trained and skilled in SQL through instructor-led training and guided projects to help you acquire the required practical skills. Also, check out our YouTube video on SQL Tutorial For Beginners.

0 votes
ago by (1.5k points)

As per above options, option A is correct that is “Null values are displayed last in the ascending sequences”.In SQL whereever we are using order by then in the starting we are going to get the null values.

Option B is wrong because data is sorted in ascending order by default

Option C is wrong because we can use alias in order by clause

Option D is wrong because we cannot sort the columns that are not in select command

Option E is wrong because results will come in normal order 

Related questions

0 votes
2 answers
0 votes
1 answer
asked Apr 2, 2021 in Java by dev_sk2311 (45k points)
0 votes
2 answers
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...