Today we are going to discuss about the varchar(-1). why we are using varchar(-1) and what is the purpose of it.
Varchar(-1)
In case if we user doesnt know the column length. how many character will user enter: so it is better to go with vachar(-1)
Consider the column address is of varchar(-1), now in case 1 when user enter a data of size varchar(10) the size of the column dynamically accepts the user data of size varchar 10. later in case 2 user tries to insert data of size varchar 100. now the column address can accept user data of size 100.
NOTE: The size of the column will change automatically when user tries to insert a data of size greater than previous inserted data.