Re: can you name a column in sybase with underscore?
- From: Klaus Riemer <krr@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 21 May 2007 21:17:46 +0200
bret@xxxxxxxxxx schrieb:
On May 18, 10:41 am, "Carl Kayser" <kayse...@xxxxxxx> wrote:Hi Bret and all the rest"sybaselady" <dcsoi...@xxxxxxxxx> wrote in message
news:1179504409.864699.212770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Quick question about naming conventions in sybase.Yes, but be careful of what you wish for.
Can you name a column starting with _
say for example Could you name a column
_CREATED
Thanks
set quoted_identifer on
go
create table "F U B A R"
("_C R ATED" tinyint ....
..... )
go
But then you basically have to refer to these with double quotes (not single
quotes).
Also note that underscores in names can cause some possibly
unanticipated
effects if you query the names using the LIKE clause, as the
underscore is also
a wildcard character.
For instance if you had tables "foo_7" and "foobar"
select name from sysobjects where name like "foo_%" will return both
foo_7 and foobar.
To your post I suggest to some tiny addendum:
when using underscores e.g. in like operation they need
an >escape "_" < masquerade to get the proper output.
But anyway all postings in this thread direct to the same conclusion:
names containing underscores are permitted - but far from being practical.
/Klaus
Klaus Riemer, DE
klausATroehlergenriemer!REMOVE.SPAM.PROTECTOR!.de
.
- References:
- can you name a column in sybase with underscore?
- From: sybaselady
- Re: can you name a column in sybase with underscore?
- From: Carl Kayser
- Re: can you name a column in sybase with underscore?
- From: bret
- can you name a column in sybase with underscore?
- Prev by Date: Re: can you name a column in sybase with underscore?
- Next by Date: [Announce] Stylus Studio 2007 Release 2 Now Available
- Previous by thread: Re: can you name a column in sybase with underscore?
- Next by thread: Non-printing literal in where clause
- Index(es):
Relevant Pages
|
|