0

I am connected to Teradata via the dbeaver. I successfully got connected to it after downloading the libraries from the https://downloads.teradata.com/. I am completely new to teradata. I copied one command from the tutorials point and tried to ran it.

CREATE SET TABLE PUBLIC.EMPLOYEE,FALLBACK ( 
   EmployeeNo INTEGER, 
   FirstName VARCHAR(30), 
   LastName VARCHAR(30), 
   DOB DATE FORMAT 'YYYY-MM-DD', 
   JoinedDate DATE FORMAT 'YYYY-MM-DD', 
   DepartmentNo BYTEINT 
) 
UNIQUE PRIMARY INDEX ( EmployeeNo );

But I keep getting the error:

SQL Error [3706] [42000]: [Teradata Database] [TeraJDBC 16.20.00.06] [Error 3706] [SQLState 42000] Syntax error: expected something between the 'TABLE' keyword and the 'PUBLIC' keyword.

I even tried creating the table form the dbeaver UI then still it is giving me an error. If someone could help me I will really appreciate it.

Saugat Dahal
  • 39
  • 1
  • 10
  • You have a syntax error. Read the grammar & manual. Show that constituent subexpressions are OK. Chop out code if it leaves the error. Also:. Please before considering posting read your textbook and/or manual & google any error message or many clear, concise & precise phrasings of your question/problem/goal, with & without your particular strings/names & site:stackoverflow.com & tags; read many answers. If you post a question, use one phrasing as title. Reflect your research. See [ask] & the voting arrow mouseover texts. – philipxy Jun 25 '20 at 15:42
  • Hi @philipxy, thank you for your suggestions. I will keep that in mind. This is the table creation command for the teradata. I have checked it thousand time, and even the simple command like create table public.employee (age int) was throwing me an error saying the syntax so I posted the question. I know it is a syntax error but when i googled everywhere the command is still the same. The teradata documentation also had the same command, therefore I asked the question. – Saugat Dahal Jun 25 '20 at 15:53
  • Meanwhile chop out code that leaves the error & see what code you can use after chopping that doesn't give the error. Quote the manual re syntax. Be sure you google as described in my comment. What is the link to your SQL specifically? What create have you been able to run? Did you read & follow the tutorial before the code? Read the grammar--Do you have a DB called PUBLIC? – philipxy Jun 25 '20 at 16:20
  • 1
    No idea what tutorial you are using, but PUBLIC is a reserved word and sort of a "dummy" username. You cannot create objects in PUBLIC. You can GRANT to PUBLIC if there's some permission you want all users to have. – Fred Jun 25 '20 at 16:30

0 Answers0