skip to Main Content

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 ([email protected],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

2

Answers


  1. 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 ('[email protected]','d%6AsQPq7y',1);
    
    Login or Signup to reply.
  2. 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 ('[email protected]','d%6AsQPq7y',1) 
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search