SQL-J Language Reference,
Page 108 of 118


[top]
[prev]
[next]
Documentation Top
Global Index
Reference Manual
TOC Index
Grammar index
Developer's Guide
TOC Index
Tuning Cloudscape
TOC Index

VARCHAR

VARCHAR provides for variable-length storage of strings.

Syntax for Column Definition

VARCHAR (length)

length is an unsigned integer literal, and it must not be greater than the constraint of the integer used to specify the length, the value java.lang.Integer.MAX_VALUE.

Corresponding Compile-Time Java Type


java.lang.String

JDBC Metadata Type (java.sql.Types)


VARCHAR

Cloudscape does not pad a VARCHAR value whose length is less than expected. Cloudscape truncates spaces from a string value when a length greater than the VARCHAR expected is provided. Characters other than spaces are not truncated, and instead cause an exception to be raised. When binary comparison operators are applied to VARCHARs, the lengths of the operands are not altered, and spaces at the end of the values are ignored.

When CHARs and VARCHARs are mixed in expressions, the shorter value is padded with spaces to the length of the longer value.

The type of a string literal is CHAR, not VARCHAR.

[top]
[prev]
[next]


Cloudscape Version 3.0
For technical support, go to: www.cloudscape.com and click Support.
Copyright © 1998 and 1999 Cloudscape, Inc. All rights reserved.