Read the standard. The SQL/PSM part defines a full-blown programming language with loops and IF-THEN-ELSE and what have you. SQL/PSM was initially amended to the existing standard in 1996 and formally included in SQL:1999.
As Bill Karwin hinted at, SQL does not have features for UI interaction, but then the very same thing is true about the java language (no, the swing package is not part of the language), and the COBOL language, and the ALGOL language, and many many others.
SQL began life as a data sublanguage. That history is >20yrs behind us. (The "data sublanguage" portion is still the most-used and most-useful part, but that does not change the fact that technically speaking, SQL-the-language has everything it takes to be regarded as a full-blown programming language.)