Jump to content


Photo

Creat Table Com Numeros


  • Faça o login para participar
1 reply to this topic

#1 gregorytg

gregorytg

    Mestre

  • Usuários
  • 632 posts
  • Sexo:Não informado

Posted 25/10/2004, 13:31

Estou com problema
como eu crio uma tabela que tenha os campos com nome=NUMEROS
CREATE TABLE gabaritos (
id int(5) NOT NULL auto_increment,
1 char(200) NOT NULL,
2 char(200) NOT NULL,
3 char(200) NOT NULL,
4 char(200) NOT NULL,
5 char(200) NOT NULL,
6 char(200) NOT NULL,
7 char(200) NOT NULL,
8 char(200) NOT NULL,
9 char(200) NOT NULL,
10 char(200) NOT NULL,
11 char(200) NOT NULL,
12 char(200) NOT NULL,
13 char(200) NOT NULL,
14 char(200) NOT NULL,
15 char(200) NOT NULL,
16 char(200) NOT NULL,
17 char(200) NOT NULL,
18 char(200) NOT NULL,
19 char(200) NOT NULL,
20 char(200) NOT NULL,
categoria_id (5) NOT NULL,
serie_id (5) NOT NULL,
PRIMARY KEY (id),
UNIQUE id (id)
);

Problema RESOLVIDO é so colocar `1` ;)

CREATE TABLE gabaritos (
id int(5) NOT NULL auto_increment,
`1` char(200) NOT NULL ,
`2` char(200) NOT NULL ,
`3` char(200) NOT NULL ,
`4` char(200) NOT NULL ,
`5` char(200) NOT NULL ,
`6` char(200) NOT NULL ,
`7` char(200) NOT NULL ,
`8` char(200) NOT NULL ,
`9` char(200) NOT NULL ,
`10` char(200) NOT NULL ,
`11` char(200) NOT NULL ,
`12` char(200) NOT NULL ,
`13` char(200) NOT NULL ,
`14` char(200) NOT NULL ,
`15` char(200) NOT NULL ,
`16` char(200) NOT NULL ,
`17` char(200) NOT NULL ,
`18` char(200) NOT NULL ,
`19` char(200) NOT NULL ,
`20` char(200) NOT NULL ,
categoria_id char(200) NOT NULL ,
serie_id char(200) NOT NULL ,
PRIMARY KEY (id),
UNIQUE id (id)
)

Edição feita por: gregorytg, 25/10/2004, 13:52.

"Porque o Senhor será a tua confiança, e guardará os teus pés de serem presos". \o/

#2 Prog

Prog

    ...

  • Ex-Admins
  • 3761 posts
  • Sexo:Masculino
  • Localidade:Rio de Janeiro/RJ
  • Interesses:TI, Software Livre, Design Digital e Rock'n'Roll.

Posted 26/10/2004, 08:49

Só fazendo um comentário...
Vc esta mesmo querendo usar CHAR(200) ???
Seria melhor usar VARCHAR.
------
Mero mortal!




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq