Data Types
- Which mode does not remove trailing spaces when CHAR values are retrieved?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
When the CHAR values are stored, they are right-padded with spaces to the specified length. When CHAR values are retrieved, trailing spaces are removed unless the SQL mode ‘PAD_CHAR_TO_FULL_LENGTH’ is enabled.
- The storage in bytes required for VARCHAR(4) type ‘abcd’ is _____________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
The ‘VARCHAR’ values are not padded when they are stored. The trailing spaces are retained when values are stored and retrieved in conformance with standard SQL. The given size is 5 bytes.
- The maximum value that can be specified to the size of VARCHAR is _____________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
The values in ‘VARCHAR’ columns are variable length strings. The length can be a value from 0 to 65,535. The effective maximum length of a VARCHAR is subject to the maximum row size.
- The operator used in PHP to access property of an object is ________________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
If $a represents an object, the properties it has can be accessed as $a->property-name. For instance, $a->white, $a->black, $a->blue, $a->red can be the properties of $a and accessed in this way.
- Arrays can have associative indices in PHP.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
The PHP arrays can even have both numeric and associative elements. For example, $x[1] and $x[“large”] can both be the elements of the same array. $x can be an object, whose elements are accessed by the arrow ‘->’ operated.