A table is knownTThe structure is as follows:
TableT |
Name |
Subject |
Score |
Varchar2 (10) |
Varchar2 (10) |
Number (3) |
Cannot be blank |
Cannot be blank |
|
(1)Create a table named according to the known table structureT1Table,Write and create a tableT1OfSQLStatement.
Create table t1
(
NameVarchar2 (10) not null,
SubjectVarchar2 (10) not null,
ScoreNumber (3)
)
(2)Forward tableTInsert the following data,And write the insertedSQLStatement
Data:
Zhang San Chinese20
James math30
Zhang SanPhysical50
Li Si Chinese70
Li Si mathematics60
Li Si Physical90
Insert into t1 values ('Zhang San','Chinese', 20 );
Insert into t1 values ('Zhang San','Mathematics', 30 );
Insert into t1 values ('Zhang San','Physical', 50 );
Insert into t1 values ('Li Si','Chinese', 70 );
Insert into t1 values ('Li Si','Mathematics', 60 );
Insert into t1 values ('Li Si','Physical', 90 );
(3)InPL/SQLHow to passSelectStatement to change it to the following structure
Name, Chinese, Mathematics, Physics
Zhang San203050
Li Si706090