Write the data type suitable for the following fields. a. DateofBirth b. Name c. Rollno d. Class
Answers
Answered by
2
Answer:
(22)(3)2006) name) ruman)(class)10th)
Answered by
0
Answer:
a. DateofBirth – Date
b. Name – Char or Varchar
c. Rollno – TinyInt / Smallint / Integer
d. Class – Char / Varchar
Explanation:
- A datatype or a field type determines what type of data can be stored in a field and how it can be processed.
- Date Datatype : These datatypes store dates : DATE (range 1/1/99 to 1/1/9999).
- CHAR Datatype: CHAR datatype is used to store character string of fixed length specified. If the length of the string is less than fixed-length then it is padded with extra blank spaces .The storage size of the CHAR datatype is n bytes( fixed length). We can use this datatype when we expect the data values in a column are of the same length.
- VARCHAR Datatype: VARCHAR datatype is a datatype in SQL which is used to store character string of variable length. If the length of the string is less than set length then the string will store as it is without padded with extra blank spaces. The storage size of the VARCHAR datatype is equal to the actual length of the entered string in bytes. We can use this datatype when we expect the data values in a column are of variable length.
- INTEGER datatype store integer values only. Integer data types along with the number ranges they can also store are listed below :
TINYINT ( 3 spaces : range 0 to 255 ),
SMALLINT ( 5 spaces : range - to -1 ),
INTEGER ( 10 spaces : range to - 1)
To know more about SQL tables, query and datatype, click here ->
https://brainly.in/question/17730018
https://brainly.in/question/36371162
Similar questions