In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "SQL Server,Oracle,DB2 how to build table query sentence", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's train of thought slowly in depth, together to study and learn "SQL Server,Oracle,DB2 how to establish table query statement" bar!
How to compare the statements of establishing table query in SQLServer,Oracle,DB2
Statements created on SQLServer using subqueries:
SELECTempno,ename,sal*12ANNSAL,hiredateintodept30FROMempWHEREdeptno=30
On Oracle, the query is used to build the table:
CREATETABLEdept30ASSELECTempno,ename,sal*12ANNSAL,hiredateFROMempWHEREdeptno=30
On DB2, the query is used to build the table:
Createtabledept30as (SELECTempno,ename,sal*12ANNSAL,hiredateFROMempWHEREdeptno=30) definitiononly;insertintodept30SELECTempno,ename,sal*12ANNSAL,hiredateFROMempWHEREdeptno=30
You can also use this statement in DB2 to copy the data in the table. Copytable:createtableemp_baklikeemp
How to compare the statements of SQLServer,Oracle,DB2 to modify tables
The statement on the SQLServer that adds columns:
ALTERTABLEdept30ADDjobVARCHAR (9)
The statement on the Oracle that adds columns:
ALTERTABLEdept30ADD (jobVARCHAR2 (9))
The statement on the DB2 that adds columns:
ALTERTABLEdept30ADDjobVARCHAR (9)
The statement on the SQLServer that modifies the column:
ALTERTABLEdept30ALTERcolumnenameVARCHAR (15)
The statement on the Oracle that modifies the column:
ALTERTABLEdept30MODIFY (enameVARCHAR2 (15))
The statement on the DB2 that modifies the column:
D:ALTERTABLEdept30ALTERcolumnenamesetdatatypeVARCHAR (15);
Thank you for your reading, the above is the content of "how to establish a table query statement in SQL Server,Oracle,DB2". After the study of this article, I believe you have a deeper understanding of how to establish a table query statement in SQL Server,Oracle,DB2, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.