MYSQL True or faluse
I am pretty new to MYSQL I am creating a table and have got a few question.
1)How do I set a boolean Value True/False is it case of
DelPresenter bool not null,
2)This is the code for my first table (below) my question is the engine = innodb do I have to have this line for every table I make ??
create table delegate
(DelNo int not null,
DelName varchar() not null,
DelAddress varchar() not null,
primary key (DelNo))
engine = innodb;
or DelPresenter TINYINT(1) not null,
BOOL & BOOLEAN are synonyms for TINYINT(1) and zero values are false all non-zero values are true.
2/ Yes if you want to use InnoDB as the storage engine for your database.
It means the column can store anywhere from 0 to 15 characters. If you only ask it to store 3 bytes, it won't pad the other 12. BUT the database incurs some overhead (15 bytes in SQL Server, ironically) to manage a variable character column. Generally people use them with larger ranges, ie varChar(230), and in this case you basically pay for what you use.