Complete the code to create a column that stores variable-length strings up to 100 characters.
CREATE TABLE users (username [1](100));
The VARCHAR type stores variable-length strings with a maximum length you specify, here 100 characters.
Complete the code to create a fixed-length string column of 10 characters.
CREATE TABLE products (code [1](10));
The CHAR type stores fixed-length strings. Here, it always uses 10 characters.
Fix the error in the code to create a column for long text data.
CREATE TABLE articles (content [1]);The TEXT type is used for long text data and does not require a length specifier (unlike VARCHAR or CHAR).
Fill both blanks to create a table with a fixed-length code and a variable-length description.
CREATE TABLE items (code [1](5), description [2](255));
CHAR(5) is for fixed-length codes, and VARCHAR(255) is for variable-length descriptions.
Fill all three blanks to create a table with a variable-length name, fixed-length code, and a long text notes column.
CREATE TABLE records (name [1](100), code [2](8), notes [3]);
VARCHAR(100) for variable-length names, CHAR(8) for fixed-length codes, and TEXT for long notes.