473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

doubt in a datatype

priyan
54
what is the equivalent datatype in postgre for uniqueidentifier in sql . please help me
Aug 4 '07 #1
4 2240
michaelb
534 Expert 512MB
what is the equivalent datatype in postgre for uniqueidentifier in sql . please help me
I am not quite sure of what you mean by "uniqueidentifier in sql"
If you are looking for an auto-increment number that can be used as a key for the records this would be SERIAL (also see the Sequence manupilation functions )

If you are wondering about internal object id which is being maintained by the database this is something called OID, although in the latest PostgreSQL versions user tables are created without OIDs unless you specifically ask for it in CREATE TABLE command.
Aug 6 '07 #2
priyan
54
I am not quite sure of what you mean by "uniqueidentifier in sql"
If you are looking for an auto-increment number that can be used as a key for the records this would be SERIAL (also see the Sequence manupilation functions )

If you are wondering about internal object id which is being maintained by the database this is something called OID, although in the latest PostgreSQL versions user tables are created without OIDs unless you specifically ask for it in CREATE TABLE command.

i mean uniqueidentifier in sql we can have a 16 bit value
Aug 6 '07 #3
michaelb
534 Expert 512MB
I think what you have in mind is GUID (a.k.a. UUID)
I would not call it "uniqueidentifier in sql", but anyway, if this is what you need this feature is being planned for, there's no uuid generator in the current PostgreSQL version.
There are other tools you can use to generate GUID, and you can store them in a varchar field.
Aug 6 '07 #4
priyan
54
I think what you have in mind is GUID (a.k.a. UUID)
I would not call it "uniqueidentifier in sql", but anyway, if this is what you need this feature is being planned for, there's no uuid generator in the current PostgreSQL version.
There are other tools you can use to generate GUID, and you can store them in a varchar field.
thank u very much michaelb for helping me .
Aug 8 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: thepercival | last post by:
Hello, I have a stored procedure and the return data type is number(16) as you can see. but I get it back in the code as a var_numeric and then the precision depends on the value of the...
8
by: Eternally | last post by:
Hi folks, I've got a program which has a function which uses templates to accept parameters of any type. Works well, but there's one certain datatype which I want to special case and do an...
0
by: SoYouKnowBrig | last post by:
Hi All, I am using Microsoft.ApplicationBlocks.Cache.CacheManager to persist a System.Data.Dataset object. This Dataset object has a DataTable that is created from an existing DataTable using...
4
by: Baskar RajaSekharan | last post by:
Hi, Please let me know whether it's possible in C# . I want to crate one Method, which will accept any Number of Parameter and Different DataTypes. Note: 1. Without Overloading Methods...
1
by: Baskar RajaSekharan | last post by:
Hi, I have one Doubt in C#. I bound one CheckBox control to the Dataset column. when Leave the Checkbox using the Tab, the Value of the Check box is automaticllay set it to Zer 0r False. ...
4
by: Orchid | last post by:
How can I change a Date datatype to a Number datatype? For example, I want a date 10/31/2006 to show 1031 as Number datatype. But I don't want it becomes 39021. What formula should I use? ...
4
by: pits | last post by:
Hi...Have this doubt about floating points in C Look at the two programs below. 1. main() { float a = 0.7; if(a < 0.7) printf("Less"); else ...
11
by: BD | last post by:
Hi, all. I'm running 8.2 on Windows. This is a development platform for a project whose production environment is running on a mainframe. I believe that the RI compilation process is not...
5
by: tim007 | last post by:
hi all, As we design a database I have a field for storing the last name, so i give the datatype varchar (50) now my question is there any difference if i were use varchar (200) instead...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.