Aqua Data Studio 15.0.0-dev-47
Build #: 35085
Built on: 2013-Dec-03 08:12:45 AM
Database version : Greenplum 4.2
Windows 7 : 64 bit
Step 1: Connect to Greenplum database server.
Step 2 : Create any database ->Expand created database -> Expand “public” schema -> Right click on “tables” node -> Open “Query analyzer”
Step 3: Execute following create table script on query analyzer.
CREATE TABLE "public"."table_bit" (
"c1" int NOT NULL,
"c2" bit(5) NOT NULL
)
GO
In this query, I have explicitly mentioned “length” of datatype “bit” column.
Table created successfully.
Step 4: Expand “tables” folder-> Right click on table “table_bit” -> Select option “Table properties”
Length of bit column is displayed as “5”.
Insert data in table, bit column only accept string containing 0s and 1s of length 5.
Step 5: Right click on table “table_bit” -> Select option “script object to window as” -> select option “create”.
Following script generated,
CREATE TABLE public.table_bit (
c1 int4 NOT NULL,
c2 bit NOT NULL
)
DISTRIBUTED BY (c1)
GO
This script does not contain size of bit column. (refer image_1.jpg)
Step 6: Right click on tables node -> Select option “Create table” -> enter name “test_table” ->enter column name “c1” -> select datatype “bit” -> enter length, say 5 -> Switch to preview sql tab. (refer image_2.jpg)
Entered length is not reflected in create script.
If we still create table, table with bit column of length 1 is created.
|
415 KB
|
316 KB
Issue #11024 |
Closed |
Completion |
No due date |
No fixed build |
No time estimate |