varchar max length 1

varchar max length

TINYTEXT              255
TEXT/VARCHAR          65,535
MEDIUMTEXT    	      16,777,215
LONGTEXT              4,294967,295

Here is what the above code is Doing:
1. We’re creating a new table called ‘users’ with the following columns:
– id: an integer that will be the primary key for the table.
– email: a string that will be the user’s email address.
– password: a string that will be the user’s password.
– created_at: a datetime that will be the date and time the user was created.
2. We’re creating a new table called ‘messages’ with the following columns:
– id: an integer that will be the primary key for the table.
– message: a string that will be the message.
– created_at: a datetime that will be the date and time the message was created.
– user_id: an integer that will be a foreign key referencing the user table.

Similar Posts