0

I am going through an SQL course that tasks me with the exercise of importing data from a CSV file, into an existing SQL database. The syntax has been described to me as follows:

COPY *table_name* FROM '*file path*' DELIMITER "," CSV HEADER;

However, this syntax results in a syntax error every time.

Execution finished with errors.
Result: near "COPY": syntax error
At line 1:
COPY

I guess this course is wrong, as there must be a way to do this and this is not the correct syntax to use. I looked up other possible syntax choices, including COPY INTO but that also produces an error. What would be the ideal syntax for this function?

4

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.