हिंदी

In a table in the MYSQL database, an attribute A of datatype varchar(20) has the value “Keshav”. The attribute B of datatype char(20) has the value “Meenakshi”. How many characters are occupied

Advertisements

प्रश्न

In a table in the MYSQL database, an attribute A of datatype varchar(20) has the value “Keshav”. The attribute B of datatype char(20) has the value “Meenakshi”. How many characters are occupied by attribute A and attribute B?

विकल्प

  • 20,6

  • 6,20

  • 9,6

  • 6,9

MCQ
Advertisements

उत्तर

6,20

Explanation:

Keshav has a 6-character length. Varchar is known to have a changeable length. Therefore, even if the field's width is 20, it will only use the characters' total length. Rather, char has a set length. Regardless of the number of characters in the actual data, it will take up the entire number of characters set aside for the field.

shaalaa.com
Data Types and Constraints in MySQL
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2023-2024 (March) Board Sample Paper
Advertisements
Share
Notifications



      Forgot password?
Use app×