Struggling to get an INSERT to work, can anyone help?

Here's my scenario:

Students        [table]
------------
Student_ID      [primary key, auto-increment]
Student_name
Student_sex

Extra_Credit    [table]
------------
EC_ID   [primary key, auto-increment]
Student_ID
Points

First: INSERT INTO Students (Student_name, Student_sex) VALUES('"Josh Baxter", "M");

[suceeds]

Then: INSERT INTO Extra_Credit (Student_ID, Points) SELECT MAX(Student_ID) from Students,

(1) ...VALUE ('25');

or

(2) ... '25' as Points;

Either one fails... Any hints on syntax to achieve the insert (pulling the Student_ID in from the just modified record in the Students table)?

TIA!


Eric Pederson






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to