If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Does "text type" belong to SQL2 standard ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-04-03, 18:01
sylvain_2020 sylvain_2020 is offline
Registered User
 
Join Date: Sep 2003
Posts: 9
Does "text type" belong to SQL2 standard ?

Hi,

I am developping an application that should work with different RDBMS.

I need to store a field of 500 characters.

Hence, I thought of using the type "text" that works with MySQL, but I am wondering if it is part of SQL standard or if it is supported by the main RBDMS (Orcale, DB2, SQL Server ...).

Thanks in advance,

Sylvain
Reply With Quote
  #2 (permalink)  
Old 11-05-03, 05:46
gannet gannet is offline
Registered User
 
Join Date: Oct 2002
Location: Plymouth UK
Posts: 116
The "Text" datatype is not part of the ANSI SQL99 standard. Most vendors also have their own variants of datatypes. The nearest agreements in datatypes for your purposes I guess would be to use a VARCHAR. However there is still variation, in Oracle this would be a VARCHAR2.

Hope this help you on your way.
Reply With Quote
  #3 (permalink)  
Old 11-05-03, 09:41
sylvain_2020 sylvain_2020 is offline
Registered User
 
Join Date: Sep 2003
Posts: 9
Hi,

Quote:
Originally posted by gannet
The "Text" datatype is not part of the ANSI SQL99 standard. Most vendors also have their own variants of datatypes. The nearest agreements in datatypes for your purposes I guess would be to use a VARCHAR. However there is still variation, in Oracle this would be a VARCHAR2.

But with MySQL for example VARCHAR is limited to 255. We can't do VARCHAR(500).

So you see any solution ?

Regards
Sylvain
Reply With Quote
  #4 (permalink)  
Old 11-05-03, 11:19
gannet gannet is offline
Registered User
 
Join Date: Oct 2002
Location: Plymouth UK
Posts: 116
Unfortunately there will be no vendor independent way araound this, you will need to generate some vendor specific translations. Not what you wanted to hear I know.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On