I have this query:
INSERT INTO ella (id, tmstmp AS DATE, ändere)
VALUES (id 1, DATE 26.08.2020,10:44:33, ändere "Thomas");
but it always show error: missing comma. What do I do wrong? Where else should I put the comma)
The table name is Ella. The column names are id, date, and ändere. Thank you for your help!
You need to enclose non-numeric values in single quotes and the column list doesn't take a data type. Names with non-ASCII characters need to be enclosed in double quotes in SQL. String literals need single quotes. The column names are also not repeated in the VALUES clause. And as you want to specify a date and time, you need to use a timestamp
literal, not a date
literal.
INSERT INTO ella (id, tmstmp, "ändere")
VALUES (1, timestamp '2020-08-26 10:44:33', 'Thomas');
All of the above refers to standard ANSI SQL and this would work in e.g. Postgres and Oracle. Not all DBMS products support ANSI timestamp literals that way though. But as you haven't specified your DBMS, the answer complies with the SQL standard.