Results 1 to 2 of 2

Thread: SQL Inputting data into a table

  1. #1
    Join Date
    Feb 2003
    Posts
    1

    Angry SQL Inputting data into a table

    I am trying to do the SQL course online and it asked me to input info into my table. I am typing the following SQL code:

    insert into employee_LJH2609
    (firstname,lastname,title,age,salary)
    values('Jonie','Weber','Secretary',28,195.00,'Pots y','Weber','Programmer',32,45300.00,'Dirk','Smith' ,'Programmer II',45,75020.00);

    I keep getting a message telling me to check my sql but i can not see any thing wrong with it. Please help ive been stuck for days!


  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    The problem is you listed only 5 columns in insert list and tried to insert more than 5 values.

    If you want to insert 3 rows, you have to write 3 insert statements like

    insert into employee_LJH2609
    (firstname,lastname,title,age,salary)
    values('Jonie','Weber','Secretary',28,195.00)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •