Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert into test(1,5,6) values (12,'yassine','mannai');

Status
Not open for further replies.

yassinemannai

Programmer
Jun 8, 2001
12
TN

Hi,
Can i insert a tuple in a table like this ligne of code:

insert into test(1,5,6) values (12,'yassine','mannai');

in the place of this :

insert into test(id,prenom,nom) values (12,'yassine','mannai');


thanks
 
Unless Oracle has added a feature that I'm not aware of, that sort of positional referencing of columns is not allowed.

If you want this functionality I would write a stored procedure that accomplished the same thing. Input would be the table name, column positions, and update values. The procedure would translate the column positions into actual column names by querying dba_tab_columns, construct a valid insert statement using the column names, and then execute it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top