Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread ALTER TABLE: Can this SQL syntax be used to make a field longer?
Thu, Feb 23 2006 2:52 PMPermanent Link

Sam Jones
Hello DBISAM universe!

Using DBISAM v4 (4.21, I believe). Using SQL syntax (not direct table access).

It appears I cannot do lengthen a column.... e.g. I would like something like this syntax

mytable.myfield is currently CHAR(50), I want to make it longer. So I would like this syntax:

      ALTER TABLE "mytable" Alter myfield CHAR(100)

Doable in the latest DBISAM ??
Thu, Feb 23 2006 4:26 PMPermanent Link

"Johnnie Norsworthy"
"Sam Jones" <sjones9@gmail.com> wrote in message
news:2233750E-E199-47CB-8460-F7D214936756@news.elevatesoft.com...
> Hello DBISAM universe!
>
> Using DBISAM v4 (4.21, I believe). Using SQL syntax (not direct table
> access).
>
> It appears I cannot do lengthen a column.... e.g. I would like something
> like this syntax
>
> mytable.myfield is currently CHAR(50), I want to make it longer. So I
> would like this syntax:
>
>       ALTER TABLE "mytable" Alter myfield CHAR(100)
>
> Doable in the latest DBISAM ??

For sure:

ALTER TABLE mytable
REDEFINE myfield CHAR(100)

I think that is the correct syntax.

-Johnnie

Thu, Feb 23 2006 5:01 PMPermanent Link

Sam Jones
Hmmmmmmmmmmmmmmm

In SQL Server the syntax is:

alter table mytable
alter column mycolumn varchar(100)


REDEFINE looks.... OK for DBISAM, but not very portable.

(or is it all in my head ? Smiley)

Thanks to all for input on this.

Thu, Feb 23 2006 5:19 PMPermanent Link

Michael Baytalsky
Hi Sam,

> REDEFINE looks.... OK for DBISAM, but not very portable.
It is pretty hard to find two DDL dialects that match each
other... unfortunately. I had to research a lot of them for
the Designer (see link in another post). I can guarantee, that
there are no two databases engines with same DDL :-/.
However, the beauty of dbisam is that is allows for modification
of any property of any schema object through the same
straightforward syntax, so, it's pretty good.

Regards,
Michael
Fri, Feb 24 2006 1:33 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Sam,

<< In SQL Server the syntax is: >>

There is no standard currently for modifying a column or constraint with
ALTER TABLE, so it's up to the vendor.  Some vendors use ALTER, some use
MODIFY, some use REDEFINE....

--
Tim Young
Elevate Software
www.elevatesoft.com



Fri, Feb 24 2006 7:12 PMPermanent Link

Michael Baytalsky
> ALTER TABLE, so it's up to the vendor.  Some vendors use ALTER, some use
> MODIFY, some use REDEFINE....
.... and then there's MySQL Wink.

Michael
Mon, Feb 27 2006 6:56 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Michael,

<< ... and then there's MySQL Wink. >>

It uses them all, doesn't it ? Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Feb 27 2006 7:08 AMPermanent Link

Michael Baytalsky

> << ... and then there's MySQL Wink. >>
> It uses them all, doesn't it ? Smiley
It does Wink. And each has its own specifics Wink For example,
you can rename field with MODIFY, but not with CHANGE (or
vice versa - who can remember that?) Smile.

Michael
Image