हिंदी

Can you think of an attribute for which fixed length string is suitable?

Advertisements
Advertisements

प्रश्न

Can you think of an attribute for which fixed length string is suitable?

लघु उत्तरीय
Advertisements

उत्तर

Yes. A fixed-length string (CHAR) is suitable for attributes where the number of characters is always the same.

Example: A Gender attribute can use CHAR(1) because it can store values such as M or F.

Other examples include:

  • Country code – CHAR(2) (e.g., INUS)
  • PIN code – CHAR(6) (when stored as a string)
  • Employee code – CHAR(5) if every code has exactly 5 characters.
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 8: Introduction to Structured Query Language (SQL) - Intext Questions [पृष्ठ १४५]

APPEARS IN

एनसीईआरटी Informatics Practices [English] Class 11
अध्याय 8 Introduction to Structured Query Language (SQL)
Intext Questions | Q 3. | पृष्ठ १४५
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×