In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1、SELECT INTO:
Select vale1, value2 into table 2 from table 1
--The target table Table2 does not exist. When inserting, Table2 will be automatically created, and the specified field data in Table1 will be copied to Table2 SELECT vale1, value2 into Table2 from Table1.
2、INSERT INTO:
Statement form: Insert into Table 2(field1, field2,...) select value1,value2,... from Table 1
--Target Table2 must exist. Since target Table2 already exists, we can insert constants Insert into Table2(field1,field2,field3,field4) select value1,value2,'character constant', number N from Table1 in addition to fields from source Table1.
3、UPDATE:
Name form:
update table set field1= field value 1,field2= field value 2 where field3= field value 3update table A set field1= table B.fieldx from table A, table B where table A.id= table B.id and table A. field 1= field value and table B. field 1= field value
Form 1 updates according to conditions; Form 2 updates data from Table B to Table A
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.