Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I have a table which name is data with column name First Name
data
First Name
I am trying to insert data in table but unable to do it as column name is with blank space.
INSERT INTO data(First Name) VALUES('Sample');
How can i do it, please explain.
INSERT INTO data (FirstName) VALUES ('Sample');
You need to use backticks to encapsulate the field names
INSERT INTO data(`First Name`) VALUES('Sample');
Add a comment
Remove space from you column name First Name should be FirstName.
FirstName
INSERT INTO data(FirstName) VALUES('Sample');
Or your column contain space then you can use like
INSERT INTO data([First Name]) VALUES('Sample');
Required, but never shown
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.
Explore related questions
See similar questions with these tags.
First Name) VALUES('Sample');INSERT INTO data (FirstName) VALUES ('Sample');