DATATYPES in sql || Sql Tutorial -5
DATATYPES IN SQL The data type represents the type of data to be entered into a column and Db engine can assign memory for thevalue entered into the column. There are 5 types of DataType in sql. String DataTypes Numeric DataTypes Date Datatypes Binary DataTypes LOB--Large Objects String Data Types These data types support sequence of character, digits and any symbol from keyboard. CHAR(size) It is used to store fixed length character strings. By default the size is 1 character, and max size is 2000 chars orbytes. Ex: student_id, email, address and so on VARCHAR2(size) It is used to store variable length character strings. No default size. we should specify size and max size is 4000 chars /bytes. Ex: emp names, addresses, descriptions, city names. LONG It is used to store variable length char data(similar to varchar2 data type) but max size is 2 GB NOTE: Only one long type column is allowed per a table. 1) NUMBER(Precision, [Scale]) It is used to store numb