Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » Create table using SQL Scrapbook(Datatype length is doubled)
Create table using SQL Scrapbook [message #695495] Mon, 11 July 2011 21:50 Go to next message
Swati Sapar is currently offline Swati SaparFriend
Messages: 20
Registered: September 2010
Junior Member
I have connected to DB2 using the DTP framework.
I am creating tables by typing the query in SQL Scrap book.(Right Click -Execute All)

CREATE TABLE TableName(
Column1 INTEGER,
Column2 VARGRAPHIC(10),
Column3 VARGRAPHIC(25),
Column4 VARGRAPHIC(25),
Column5 VARGRAPHIC(25),
Column6 VARGRAPHIC(25),
Column7 VARGRAPHIC(100)
)

The table is created fine, but the datatypes lengths seems to be doubled. Why is this so ?

index.php/fa/3329/0/
  • Attachment: DataMap.png
    (Size: 64.25KB, Downloaded 4736 times)
Re: Create table using SQL Scrapbook [message #733495 is a reply to message #695495] Tue, 04 October 2011 21:44 Go to previous message
Brian Payton is currently offline Brian PaytonFriend
Messages: 154
Registered: July 2009
Senior Member
Hi Swati,

I suspect that is because VARGRAPHIC is a "double-byte" datatype. It
uses two bytes to encode the character, rather than one. (SQL was
developed before UNICODE was created.)

On 7/11/2011 2:50 PM, Swati Sapar wrote:
> I have connected to DB2 using the DTP framework.
> I am creating tables by typing the query in SQL Scrap book.(Right Click -Execute All)
>
> CREATE TABLE TableName(
> Column1 INTEGER,
> Column2 VARGRAPHIC(10),
> Column3 VARGRAPHIC(25),
> Column4 VARGRAPHIC(25),
> Column5 VARGRAPHIC(25),
> Column6 VARGRAPHIC(25),
> Column7 VARGRAPHIC(100)
> )
>
> The table is created fine, but the datatypes lengths seems to be doubled. Why is this so ?
>
>
Previous Topic:DTP - Unable to identify some datatypes
Next Topic:More than one select statement in SQL scrapbook?
Goto Forum:
  


Current Time: Thu Mar 28 10:49:49 GMT 2024

Powered by FUDForum. Page generated in 0.02465 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top