Click here to Skip to main content
15,885,875 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
(1002, 'Daniel', 'Mfon', 40, 'N')


What I have tried:

Tried
(1002, 'Daniel', 'Mfon', 40, 'N')
for a table with columns:
EmployeeBiodata
FirstName
LastName
Age
Country

It gives an error Msg 102 Incorrect syntax near '1002'

what does it mean?
Posted
Updated 29-Apr-23 1:28am
Comments
0x01AA 29-Apr-23 6:43am    
Better you post the complete SQL statement. Use 'Improve question': Editing a Question[^]
Richard MacCutchan 29-Apr-23 7:13am    
It means what it says, the syntax of your SQL statement is incoorect.

1 solution

Probably you need to write a complete SQL statement: you don't just pass it values and hope it can work out what you wanted it to do with them!

Try this:
SQL
INSERT INTO MyTable (EmployeeBiodata
                    ,FirstName
                    ,LastName
                    ,Age
                    ,Country)
             VALUES (1002
                    ,'Daniel'
                    ,'Mfon'
                    ,40
                    ,'N')
And see if that helps.
This may help as well: W3Schools: SQL Tutorial[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900