![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Creating a dynamic case statement | squrcles | Shell Programming and Scripting | 5 | 12-19-2008 09:48 AM |
| error in insert statement | ragavhere | Shell Programming and Scripting | 2 | 12-08-2008 03:44 AM |
| How is use sselect statement o/p in insert statement. | nkosaraju | Shell Programming and Scripting | 2 | 08-06-2008 09:26 PM |
| Insert TAB in echo statement | sunils27 | Shell Programming and Scripting | 5 | 08-26-2005 03:36 AM |
| awk command for INSERT statement | nattynatty | Shell Programming and Scripting | 4 | 05-10-2002 02:11 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Dynamic Insert statement
I have a form , where i will put the values to a table.
I wrote a insert statement for the same. Table structure is ename | character varying(30) | eadd | character varying(30) | eid | integer | sal | integer In the statements, i don't want to write all the column names and values. i mean INSERT INTO emp (ename,eadd, eid,sal) VALUES (?,?,?,?); i gave something in the last column i.e sal, then my sql statement should look like. INSERT INTO emp (sal) values(that given in the form); The Code should be dynamic. If we will fill 3 fields in the form then code should be INSERT INTO tablename(col1,col2,col3) VALUES (val1,val2,val3); |
|
||||
|
Assuming these values are coming from a web form, you can refer to the fields via the name attribute or id attribute of the fields they refer to? In other words, a solution to your issue is only possible if there is a mapping between the semantics of your input data and the structure of your table.
|
| Sponsored Links | ||
|
|