Hello again:)
I am trying to select a record from a database and then amend one column in this record. I am unsure of how to code this SQL statement for a SQL Server database. Can anyone shed some light on this issue?
Printable View
Hello again:)
I am trying to select a record from a database and then amend one column in this record. I am unsure of how to code this SQL statement for a SQL Server database. Can anyone shed some light on this issue?
Just to be sure, you want to add a column to a table?
if you are trying to ammend one column then it is not called inserting , inserting means adding a row to the table...
If you are adding one more column to the table then you will need Alter Table statement query, if you are adding a new row in the table then you will need Insert into statement query.
Hope this helps.
If you are amending a value in an existing row, column then you need an UPDATE...SET... sql.
INSERT the record into the table, then using the PKey, select the row and UPDATE it.... is there a reason the value can't be set correctly when inserting the data in the first place?
-tg