![]() |
Re: Datatypes in Oracle
Which things do you think difference between Oracle and SqlServer
|
Re: Datatypes in Oracle
Is it oracle or SQL server is most commonly used.
|
Re: Datatypes in Oracle
The Basic datatypes of oracle are:
varchar2/nvarchar2 number long rowid date raw longraw char/nchar |
Re: Datatypes in Oracle
what is the difference in oracle and sql server
|
Re: Datatypes in Oracle
Another datatype is TIMESTAMP which is basically an upgrade of DATE to include fractional seconds and time zone info. There are a couple of interesting variations on TIMESTAMP which are TIMESTAMP WITH TIME ZONE and TIMESTAMP WITH LOCAL TIME ZONE.
TIMESTAMP can contain a value like '01-JAN-2003 04:56:07.890123' TIMESTAMP WITH TIME ZONE adds a time zone to that, e.g. '01-JAN-2003 04:56:07.890123 GMT' TIMESTAMP WITH LOCAL TIME ZONE is an interesting one. Timestamp values are converted to reflect the time in different parts of the world. So if I store '01-JAN-2003 04:56:07.890123 GMT' in a French database (GMT+1), it will be stored as '01-JAN-2003 05:56:07.890123' because France is 1 hour ahead of the UK. If this value is subsequently accessed by a computer in Israel which is GMT+2 it will be returned as '01-JAN-2003 06:56:07.890123'. This reflects the fact that '01-JAN-2003 04:56:07.890123 GMT' is equal to '01-JAN-2003 06:56:07.890123' in Israel. For more brain numbing stuff have a look at the INTERVAL types in the SQL reference. |
Re: Datatypes in Oracle
A little more about TIMESTAMP datatype
TIMESTAMP can be used in any of the following ways: 1. datetimestamp (fractional seconds precision) fractional seconds precision must be a number between 0 and 9 (default is 6), eaxample, timestamp(6) 2. timestamp (fractional seconds precision) with time zone Includes year, month, day, hour, minute, and seconds with a time zone displacement value. Example timestamp(9) with time zone 3. timestamp (fractional seconds precision) with local time zone Here time zone is expressed as the session time zone For example: timestamp(6) with local time zone 4. interval year (year precision) to month Here, Time period stored in years and months. For example: interval year(6) to month 5. interval day (day precision) to second (fractional seconds precision) Time period stored in days, hours, minutes, and seconds with a fractional seconds precision. For example: interval day(2) to second(6) |
Re: Datatypes in Oracle
You have described the data types very well. Thanks for your tutorial.
|
Re: Datatypes in Oracle
The differences is given below:-
1.Transaction control:- In Oracle EVERYTHING is a transaction and it is not permanent until you COMMIT. In SQL Server, there is (by default) no transaction control. 2.MVCC. In SQL Server and Oracle is different. SQL Server will allow dirty reads, and writes can block reads in MS SQL,unlike Oracle where read consistency is default and unbendable. Thanks |
| All times are GMT +5.5. The time now is 03:55. |