LOG2()()
LOG2() is a MySQL math function: numeric function LOG2() — pass numbers, get a number. Use it in SELECT, e.g. SELECT LOG2(marks) FROM students;
These functions do not change stored marks unless you UPDATE. NULL in, NULL out for most of them.
Trap — mixing LOG2 with TRUNCATE TABLE (different word). Trap: maths on VARCHAR without CAST.
In a viva, one numeric example beats listing twenty functions.
On the example next to this theory: LOG2()(): create two demo rows, then SELECT qty >= 2 ordered. Say which labels come back.
Exam tip
Explain LOG2 with one number. numeric function LOG2() — pass numbers, get a number.