Problem in Table Creation

Asked

Viewed 39 times

-2

I’m trying to create a table, and I can’t find the error in its creation:

CREATE TABLE Beneficiarios 
(
       Ano year(4), Homens number(4), Mulheres number(4)
  );
  • this is in sql?

  • 2

    specify database. Mysql, sqlserver, sqlite, postgre, firebase?...

1 answer

0

How did you not specify which SGDB is using, and by your table creation script beneficiarios be using the datatype year, I assume you’re using (or ), thus the problem of your script is having used the datatype number, among Dbms is most used in oracle.

So change the datatype number, for int, staying that way:

CREATE TABLE beneficiarios 
(
   ano year(4), 
   homens int(4), 
   mulheres int(4)
  );

I ran a test using the Sqlfiddle.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.