PDA

View Full Version : how to check mysql version



davidovv
5th January 2018, 17:58
After connecting to database i wanted to (from my application) alter some tables and add field type JSON, but the json type is available since 5.7.8
is there elegant way to check mysql version is not sufficient?

d_stranz
5th January 2018, 22:05
A SELECT VERSION() SQL statement should do it. See this. (https://docs.oracle.com/cd/E17952_01/mysql-5.0-en/information-functions.html#function_version)