Home »
MCQs »
SQLAlchemy MCQs
Which of the following is the correct syntax to sort the names in ascending order?
23. Which of the following is the correct syntax to sort the names in ascending order?
- pool = select([students]).order_by.asc(students.c.name)
- pool = select([students]).asc(students.c.name)
- pool = select([students]).where(asc(students.c.name))
- pool = select([students]).order_by(asc(students.c.name))
Answer: D) pool = select([students]).order_by(asc(students.c.name))
Explanation:
The correct syntax to sort the names in ascending order is:
pool = select([students]).order_by(asc(students.c.name))