https://www.youtube.com/playlist?list=PLYM2_EX_xVvUBh28ZT2i-jH7kBkTfB_W2

Introduction

Following tutorial is for SQL with MySql dbms. The same can be used for other dbms with little or no modifications.

Link to install Mysql - https://dev.mysql.com/downloads/

DataTypes

Character Data

char - eg:char(5) stores fixed length string of length 5. Max 255 bytes.

varchar - eg:varchar(5) stores variable length string of length 5. Max 65535 bytes.

SHOW CHARACTER SET; -- shows various character sets that are supported.

latin1 is the default character set. We can also choose a specific character set like below,

varchar(10) character set utf8    -- the particular column is set to utf8
create database foreign_sales character set utf8;   -- entire database is set to utf8

Text Data

All images in the section are from Learning SQL by Alan Beaulieu