I want to get the row number of a specific row in the table.

Also is this legal?

INSERT INTO (SELECT * FROM myTable WHERE mynumber=2) VALUES ........

I want to get the row number of a specific row in the table.

Also is this legal?

INSERT INTO (SELECT * FROM myTable WHERE mynumber=2) VALUES ........

Getting the row number depends on the DB you're using; Oracle supports this (via ROWNUM ) but MySQL for example does not.

Your statement is invalid; if you want to update a row you should be doing:

update myTable set foo = 'bar' where mynumber = 2;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.