【发布时间】:2020-01-04 06:54:59
【问题描述】:
我将在三个不同的表上以 GRADES MINUTES 和 SECONDS 为例。
T_GRADES
ID_GRADE
- Primary Key
- Autoincrement
GRADE
- Numeric (all numbers from 0 to 359)
T_MINUTES
ID_MINUTE
- Primary Key
- Autoincrement
MINUTE
- Numeric (all numbers from 0 to 59)
T_SECONDS
ID_SECOND
- Primary Key
- Autoincrement
SECOND
- Numeric (all numbers from 0 to 59)
通过这个查询,我可以查看所有三个表中的所有数据。
SELECT "T_GRADES"."GRADE", "T_MINUTES"."MINUTE", "T_SECONDS"."SECOND"
FROM "T_GRADES" "T_GRADES", "T_MINUTES" "T_MINUTES", "T_SECONDS" "T_SECONDS"
ORDER BY "GRADO", "PRIMO", "SECONDO"
现在,我如何选择 INSERT INTO a 4th TABLE,名为 T_GMS,这些字段就像所有三个表之间的 CROSS JOIN?
T_GMS
ID_GMS
- Primary Key
- Autoincrement
GRADE
- Numeric (all numbers from 0 to 359)
PRIME
- Numeric (all numbers from 0 to 59)
SECOND
- Numeric (all numbers from 0 to 59)
非常感谢您的回答。
【问题讨论】:
标签: sql sql-insert libreoffice-base