use test
-- insert
INSERT INTO cust VALUES ('hi');
-- fetch
SELECT * FROM cust
test is my database name cust is my table name have only 1 column varchar
getting error code 1064 you have an error in syntax
use test
-- insert
INSERT INTO cust VALUES ('hi');
-- fetch
SELECT * FROM cust
test is my database name cust is my table name have only 1 column varchar
getting error code 1064 you have an error in syntax
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit MohantyRank #112 · 20K reputationPosted May 5, 2023, 12:15 AM EDT
You can execute multiple SQL statements together in MySQL by separating them with a semicolon (;). So you can run the
USE,INSERT INTO, andSELECTstatements together in one block.USE test; INSERT INTO cust VALUES ('hi'); SELECT * FROM cust;Amit MohantyRank #112 · 20K reputationPosted May 4, 2023, 11:47 PM EDT
Try this
INSERT INTO cust (col_name) VALUES ('hi');raj rajRank #5,629 · 292 reputationPosted May 4, 2023, 11:57 PM EDT
INSERT INTO cust (pointss) VALUES ('hi');
my column name is pointss
already tried but still showing same error
raj rajRank #5,629 · 292 reputationPosted May 5, 2023, 12:21 AM EDT
Amit now record inserted but i am unable to see the records when i am executing select query.
do we have any edit option in table designer where we can modify direct record similar in ms sql server.