Development Desk

Just another site

Monthly Archives: April 2011

Difference Between Oracle Sql *plus and MS Sql Commands

1 week before i took the class test of Oracle SQL *Plus, I am also working on the term project so i decided that for the project i might use the MS SQL (MS SQL server 2008) then i start using this database server and i experienced that there is slight difference between the syntax of Oracle and MS SQL,

for instance

In Oracle to add column by using ALTER clause is

Alter table tablename

add ( column_name datatype not Null(etc) )

but in MS SQL it is

Alter table table_name

add column_name column_type not Null(etc)…

In Oracle if you want to use Modify clause you will use as

Alter table table_name

Modify (column_name data_type null or not Null(select one)

but in MS SQL

ALTER table table_name

Alter column column_name data_type null or not null(select one)

there is lot of data types difference between oracle and MS SQL as well.

Thank you.