Skip to main content

Posts

Showing posts with the label Class 11th Chapter 9th Structure Query Language (SQL)

ads1

Class 11th Chapter 9th Structure Query Language (SQL)

 Chapter 9th Structure Query Language (SQL) 1. Name some basic MySQL SQL elements. SOLUTION :- Some basic MySQL SQL elements are (i) Literals (ii) Datatypes (iii) Nulls (iv) Comments 2. Differentiate between CHAR and VARCHAR datatypes. SOLUTION :-  The difference between CHAR and VARCHAR is that of fixed length and variable length. The CHAR datatype specifies a fixed length character string. When a column is given datatype as CHAR(n), then MySQL ensures that all values stored in that column have this i (a length i.e., n bytes. If a value is shorter than this length n then blanks are added, but the size of value remains n bytes. VARCHAR, on the other hand, specifies a variable length string. When a column is given datatype as VARCHAR(n), then the maximum size a value in this column can have is n bytes. Each value that is stored in this column stores exactly as you specify it i.e., no blanks are added if the length is shorter than maximum length. However, if you exceed the maximum length

ads2