Bug #110037 Typo in example SQL statement in "CREATE TABLE ... SELECT Statement" page
Submitted: 13 Feb 2023 4:51 Modified: 15 Feb 2023 8:08
Reporter: Kanza Sheikh Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[13 Feb 2023 4:51] Kanza Sheikh
Description:
There is a typo on the documentation page for "CREATE TABLE ... SELECT Statement" linked at https://dev.mysql.com/doc/refman/8.0/en/create-table-select.html

The following SQL statement has a typo towards the end:

CREATE TABLE tv3 (a INT, b INT, c INT)
     >     SELECT * FROM (VALUES ROW(1,3,5), ROW(2,4,6)) AS v(x,y,z);

Whereby, running the statement is outputting a different result than is part of documentation.

How to repeat:
N/A. See description.

Suggested fix:
To get the required result from the SQL statement, the statement should be:

CREATE TABLE tv3 (a INT, b INT, c INT)
     >     SELECT * FROM (VALUES ROW(1,3,5), ROW(2,4,6)) AS v;
[13 Feb 2023 5:19] MySQL Verification Team
Hello Kanza Sheikh,

Thank you for the report and feedback.

regards,
Umesh
[13 Feb 2023 15:37] Christine Cole
Posted by developer:
 
Fixed in the MySQL 8.0 manual and the updated example will be online shortly.

Thank you for the report!
[15 Feb 2023 8:08] Kanza Sheikh
Thanks for the update!