-3

This line of code is no working, and I cannot for the life of me figure out what is wrong with it.

INSERT INTO teacher (email,password,admin) VALUES (deborah68@example.org,d%6AsQPq7y,1);

this wont run and says the error is near the end of the line any help is appreciated, the schema is called at3

Sxnn
  • 5
  • 3
  • Why are you not enclosing the string/char data in single quotes ? Assuming they are of datatype varchar, you simply enclose them in single quotes and the command will work. INSERT INTO teacher (email,password,admin) VALUES ('deborah68@example.org','d%6AsQPq7y',1) – imran Oct 20 '22 at 07:36

2 Answers2

0

Assuming your email and password are datatype of varchar, try putting '' between the values, or better you can use parameterized value if it's any backend code, try:

INSERT INTO teacher (email,password,admin) VALUES ('deborah68@example.org','d%6AsQPq7y',1);
YUNG FOOK YONG
  • 109
  • 1
  • 11
0

Why are you not enclosing the string/char data in single quotes ? Assuming they are of datatype varchar, you simply enclose them in single quotes and the command will work.

INSERT INTO teacher (email,password,admin) VALUES ('deborah68@example.org','d%6AsQPq7y',1) 
YUNG FOOK YONG
  • 109
  • 1
  • 11
imran
  • 106
  • 1
  • 7