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 Sapar
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 1016 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 Payton
Messages: 152
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: Tue Oct 21 18:41:19 GMT 2014

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

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