Hi, I've had a look around the forums but I couldn't find a specific answer to my query.
I'm following a worksheet I was given from university. We have just started working on SQL and databases and on the worksheet it uses SQL 2008 Server Management Studio.
The version I had couldn't design tables or database or something so I had to get 2012.
I followed the sheet but when I tried to add data to the table using the information from the sheet, I had errors such as:

Msg 102, Level 15, State 1, Line 9
Incorrect syntax near '<'.

It even throws the error with the code/data that is there to begin with.
The current code is:


INSERT INTO [CarsSchema].[Car]
           (<reg, varchar(10),>
           ,<make, varchar(10),>
           ,<model, varchar(30),>
           ,<colour, varchar(10),>
           ,<date, date,>)

what the sheet is telling me to enter is basically filling in the values in this format:

                ,"Clio Sport"

I'm really confused as this is the first time I have touched this sort of stuff and when I do look for help, all the tech terms are used and I can really see a problem that quite fits these parameters.
Help is very much appreciated.

4 Years
Discussion Span
Last Post by subtlehulk

That was generate automatically when I inserted the script. I had to change those values with the ones on the bottom piece of code but it kept coming up with syntax errors like the message above.


A typical SQL insert statement would look like this..

 INSERT INTO tableName ([fieldName], [...]) VALUES ('value1', ' ... ')
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.