Introduction to Flow Control Functions
Discover the role of flow control functions in MySQL.
We'll cover the following...
In imperative programming languages beyond SQL, flow control is an important concept we are often unaware of. For example, while we commonly use if
statements in Python, we do not consider them to implement flow control. Rather, we think of the if
statement as deciding between two different cases based on a condition:
Press + to interact
def is_even(number: int) -> bool:"""Returns `True` iff `number` is even."""return number % 2 == 0number = 1if is_even(number):print(f"{number} is even.")else:print(f"{number} is odd.")
In the example above, is_even
checks whether a given number
is even. Here, the if
statement is not even the only construct of flow control. As a ...
Access this course and 1400+ top-rated courses and projects.