List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:September 14 2001 6:12pm
Subject:Re: creating tables using a number
View as plain text  
At 6:39 PM +0100 9/14/01, powlow wrote:
>Hi,
>
>first posting to the list so hello. My name is Paulo. I live and work in
>lisbon, portugal.
>
>question : i want to create a table each month. want to call it somehting
>like 012001 for January 2001. mysql does not seem to allow this. Jan2001 is
>fine. d122001 is also fine. is it not possible to create tables with only a
>number as the name? is there a way round this?

Yes, it's possible, but it's a bad idea:
- numbers are hard to recognize as names
- you'll have to use a special syntax *every* time you refer to the
   table

Anyway, if you want to do this, you must enclose the name in backquotes:

CREATE TABLE `1` (i INT);

DROP TABLE `1`;

If I were you, I'd just prefix the numbers with a character, e.g.,
t012001, t022001, etc.

>
>2 days of work wasted here!!
>
>thanks for any help
>
>-paulo


-- 
Paul DuBois, paul@stripped
Thread
creating tables using a numberpowlow14 Sep
  • Re: creating tables using a numberBill TQO Adams14 Sep
  • Re: creating tables using a numberPaul DuBois14 Sep
  • Re: creating tables using a number THIS IS A BUGIgbar Foosenhopper14 Sep
    • Re: creating tables using a number THIS IS A BUGPaul DuBois14 Sep
  • Re: creating tables using a number THIS IS A BUGindrek siitan14 Sep
    • Re: creating tables using a number THIS IS A BUGMatt Wagner15 Sep
  • Re: creating tables using a numberAndreas Karl Wittwer14 Sep