The syntax of the create statement is the same, and the data types are different.
However, the syntax for creating a table using subqueries is different.
SQL Server statements created using subqueries:
Select empno, ename, Sal * 12 annsal, hiredate into dept30 from EMP where deptno = 30;
Oracle uses query to create a table:
Create Table dept30
Select empno, ename, Sal * 12 annsal, hiredate
From EMP
Where deptno = 30; DB2 uses a query to create a table: 1. create Table dept30 as (select empno, ename, Sal * 12 annsal, hiredate from EMP where deptno = 30) definition only;
2. insert into dept30 select empno, ename, Sal * 12 annsal, hiredate from EMP where deptno = 30;
You can also use this statement in DB2 to repeat the data in tabulation. Copy table: Create Table emp_bak like EMP; statement comparison for modifying tables: Statement for adding columns on SQL SERVER: ALTER TABLE dept30 add Job varchar (9); statement for adding columns on Oracle: alter table dept30 add (job varchar2 (9); statement for adding columns on DB2: alter table dept30 add Job varchar (9); statement for modifying columns on SQL Server: alter table dept30 alter column ename varchar (15); statement for modifying columns on Oracle: alter table dept30 modify (ename varchar2 (15); statement for modifying columns on DB2: D: alter table dept30 alter column ename set data type varchar (15 );