Search Postgresql Archives

Re: > ERROR: syntax error at or near "BYTE"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> On 21. Aug, 2020, at 10:19, postgresdba111@xxxxxxxxxxx wrote:
> 
> CREATE TABLE "A"
> (
>   "b"                 DATE,
>   "c  "               NUMBER,
>  " d "                  VARCHAR2(255 BYTE),
>   "e "            VARCHAR2(255 BYTE))
>   
>   When ı create table then after error why error in byte please heplp me thanks
>   
>   error:> ERROR:  syntax error at or near "BYTE"

several problems:

a) don't put blanks in your names, neither table names nor attributes.
b) PostgreSQL doesn't have NUMBER. Use integer instead.
c) PostgreSQL doesn't have VARCHAR2. User text instead.

So, the correct statement would be:

create table a (
    b date,
    c integer,
    d text,
    e text
);

Hope this helps.

Cheers,
Paul





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux