In a Multiple-line query, what is the significance of the change of MySQL prompt after the first line?


After writing the first line of multiple-line queries, MySQL changes promptly from ‘mysql>’ to ‘→’. It is significant because with the help of it we got an indication that MySQL has not seen a complete statement yet and is waiting for the rest. Consider the example below,

mysql> Select *
    -> from
    -> stock_item;

We know that after writing the first line i.e. ‘Select *’ Mysql changes its prompts which means that yet the state has not been completed. After the semicolon, MySQL considers the statement completed and throws the output.

Updated on: 22-Jun-2020

37 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements