Column Types part 2
Text can be fixed length (char) or variable length strings. Also, text comparisions can be case sensitive or insensitive depending on the type you choose.
m_status ENUM("Y", "N")
Thus, m_status column will take only Y or N as values. If you specify any other value with the INSERT statement, MYSQL will not return an error, it just inserts a NULLvalue in the column.
hobbies SET ("Reading", "Surfing", "Trekking", "Computing")
You can have 0 or all the four values in the column.
INSERT tablename (hobbies) values ("Surfing", "Computing");
|
« Previous
|
Next »
|
Creating tables In this section of the mysql training course we will explore the MySQL commands to create database tables and selecting the database. Databases ...
Inserting data in MySQL tables Inserting data into tables The INSERT SQL statement impregnates our table with data. Here is a general form of INSERT. ...
Null column type The NULL column type is special in many ways. To insert a NULL value, just leave the column name from the INSERT ...
Possible Answers create database addressbook; OR CREATE DATABASE addressbook; Note: SQL statements are case-insensitive, though table names and database names might be sensitive to case ...
SQL Tutorial What is SQL? The Structured Query Language is used in manipulating data stored in Relational Database Management Systems (RDBMS). SQL provides commands ...