1Z0-909 practice question 6 of 15
Examine this statement and output: CREATE TABLE geom (g GEOMETRY NOT NOLL, SPATIAL INDEX(g) ) ; Query OK, 0 rows affected, 1 warning (0.01 sec) An attempt is made to add an SRID attribute to the column using the statement: ALTER TABLE geom MODIFY COLUMN g geometry NOT NULL SRID 0; Which is true?
Full set: 65 questionsWhen a spatial column is part of a spatial index, the column’s definition (including the SRID attribute) is locked-in. MySQL requires that any spatial index on the column be dropped before the SRID attribute can be added, removed, or changed. Attempting ALTER TABLE … MODIFY COLUMN to add SRID 0 therefore fails with error 3764: “SRID value cannot be updated or added to a spatial column because the column is used in a spatial index.” Because the SRID change is blocked by the existing spatial index, the statement generates an error and is not executed.
A. SRID 0 is valid; it represents an undefined or Cartesian coordinate system.
B. The statement does not succeed; it aborts with error 3764, not a warning.
D. Execution fails, so the optimizer cannot use (or retain) the index.
1. Oracle MySQL 8.0 Reference Manual, §13.1.8.1 “ALTER TABLE Statement”, paragraph “Adding or modifying an SRID attribute” – “Drop any spatial index that refers to the column before altering it; otherwise the statement returns error 3764.” (https://dev.mysql.com/doc/refman/8.0/en/alter-table.html)
2. Oracle MySQL 8.0 Reference Manual, §11.5.5 “Creating Spatial Indexes” – notes that spatial indexes tie column metadata, including SRID, to the index.
3. Oracle MySQL 8.0 Reference Manual, Error Message 3764 description (Server Error Reference) – “SRID value cannot be updated or added to a spatial column because the column is used in a spatial index.”
Keep practicing
Take the free 1Z0-909 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 1Z0-909 practice questions
- Question 3Examine these commands which execute successfully: mYsql> CREATE TABLE income (acct_num I…
- Question 4Examine this statement which executes successfully: CREATE TABLE 'fshop’ ('product' JSON …
- Question 5Which two statements are true about aggregate functions?
- Question 12You are using buffered queries with PHP mysqli in a browser-based web application. Which …
