limit length of string, set max length of string column

limit length of string, set max length of string column

I want to limit usernames to 16 characters long.

I want to limit usernames to 16 characters long.

I thought this would work:

create table user(id int unsigned auto_increment not null, username tinytext(16) not null, primary key (id));

but it doesn't

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(16) not null, primary key (id))' at line 1


Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

What are the differences between Standard SQL and Transact-SQL?

In this article, we'll explain syntax differences between standard SQL and the Transact-SQL language dedicated to interacting with the SQL

SQL Full Course - SQL Tutorial For Beginners - MySQL Essentials - SQL Training

This SQL Full Course video will cover all the topics of SQL starting from scratch. This video is great for beginners who want to learn SQL and for advanced people to brush up their skills.