SQL/Script-2.sql

30 lines
1.1 KiB
MySQL
Raw Normal View History

2024-04-20 13:59:42 +08:00
INSERT INTO teaching_sql_2 (student_id,person_id,student_birthday)
Values("M11112030","A123456789","890808")
INSERT INTO teaching_sql_2 (student_id,person_id,student_birthday) # <20><><EFBFBD>ܦn<DCA6><6E><EFBFBD>ƪ<EFBFBD><C6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Values("M11112029","C123456789","900801") #<23>N<EFBFBD>Ѽƫ<D1BC><C6AB>Ӷ<EFBFBD><D3B6>ǩ<EFBFBD><C7A9>J
UPDATE teaching_sql_2 SET student_birthday='890801' # <20>N<EFBFBD>ܰʪ<DCB0><CAAA><EFBFBD><EFBFBD>Ƴ]<5D>m<EFBFBD>n
WHERE student_id='M11112030'; #<23>M<EFBFBD><4D>student id <20><>M11112030<33><30><EFBFBD>Ѽ<EFBFBD>
DELETE FROM teaching_sql_2 # <20><><EFBFBD>ܭn<DCAD>R<EFBFBD><52><EFBFBD><EFBFBD>table<6C><65>
WHERE student_id='M11112029' #<23>s<EFBFBD>Bstuden_id<69><64>M1112029
select * FROM teaching_sql_1
select student_name,student_id FROM teaching_sql_1
select * FROM teaching_sql_1 WHERE student_id='M11112030'
select * FROM teaching_sql_1 WHERE student_id='M11112030' AND student_class='EL125'
select * FROM teaching_sql_1 WHERE student_id='M11112030' or student_class='EL124'
SELECT teaching_sql_1.student_id, # <20><><EFBFBD>Mteaching_sql_1<5F><31> student_id
teaching_sql_1.student_class, # <20><><EFBFBD>Mteaching_sql_1<5F><31> student_class
teaching_sql_2.person_id # <20><><EFBFBD>Mteaching_sql_2<5F><32> person_id
from teaching_sql_1 join teaching_sql_2 # <20>Nteaching_sql_2<5F>[<5B>J
WHERE teaching_sql_1.student_id = teaching_sql_2.student_id # <20><><EFBFBD>w<EFBFBD><77><EFBFBD><EFBFBD>