Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

GUID in oracle

Posted on 2012-08-29
3
Medium Priority
?
655 Views
Last Modified: 2012-08-29
Hi experts, i have this code in sql server
CREATE TABLE dbo.TestGuid
(
  id INT NOT NULL IDENTITY(1,1),
  [Guid] UNIQUEIDENTIFIER NOT NULL
);

-- Step 10: Add 3 rows using the NEWID() function.                        

INSERT INTO dbo.TestGuid ([Guid])
VALUES (NEWID()),(NEWID()),(NEWID());

-- Step 11: Examine the resulting rows

SELECT * FROM dbo.TestGuid;

id      Guid
1      CC481D0F-4346-4A6B-960A-8BD813FCE69F
2      D53A7421-C1DF-4F8F-8B1B-29921A5C075D
3      9FFB476A-AECE-4592-894A-43CF7C35B9FD

As I can do in ORACLE?

This is the original question
http://www.experts-exchange.com/Security/Encryption/Q_27842712.html
0
Comment
Question by:enrique_aeo
  • 2
3 Comments
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 1400 total points
ID: 38345084
the function in oracle is called sys_guid()
the data type is varchar2
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1400 total points
ID: 38345086
http://docs.oracle.com/cd/B14117_01/server.101/b10759/functions153.htm
actually, the default data type of raw can be casted to varchar2, which is what I use normally.
0
 

Author Comment

by:enrique_aeo
ID: 38345097
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question