update special row
-
Hi all I have a database named information and every row in this database has a unique id! I want to update the row with the special id(that I have stored that id,for example it is in "ID" variable), but I dont know how should I use the select and update command to do this! plz help me!
-
Hi all I have a database named information and every row in this database has a unique id! I want to update the row with the special id(that I have stored that id,for example it is in "ID" variable), but I dont know how should I use the select and update command to do this! plz help me!
Start by providing the statements you are trying to use; others can only guess at what the table looks like.
-
Hi all I have a database named information and every row in this database has a unique id! I want to update the row with the special id(that I have stored that id,for example it is in "ID" variable), but I dont know how should I use the select and update command to do this! plz help me!
The basic update statement is update set = where You probably want something like "where ID = 5" Without more details, this is the best I can do to help.
-
Hi all I have a database named information and every row in this database has a unique id! I want to update the row with the special id(that I have stored that id,for example it is in "ID" variable), but I dont know how should I use the select and update command to do this! plz help me!
Provide more details like table structure & sample data
-
The basic update statement is update set = where You probably want something like "where ID = 5" Without more details, this is the best I can do to help.
ok,for example I have an information table with columns(id,fname,lnam) and I want to access the (fname,lnam) by Id,because I want to use them as string; I know that I should the select command Like this: select(id,fname,lname)WHERE id="" but I dont know how to access the fnam,lname with this Id as string!
-
Hi all I have a database named information and every row in this database has a unique id! I want to update the row with the special id(that I have stored that id,for example it is in "ID" variable), but I dont know how should I use the select and update command to do this! plz help me!
BEGIN TRANSACTION
CREATE TABLE Person
(
ID INT IDENTITY(1,1) PRIMARY KEY,
FIRSTNAME VARCHAR(50),
LASTNAME VARCHAR(50)
)INSERT INTO Person VALUES ('John', 'Doe'), ('Code', 'Project')
SELECT *
FROM PersonUPDATE Person
SET FIRSTNAME = 'Peter'
WHERE ID = 1SELECT *
FROM PersonROLLBACK
Execute in SQL-Management Studio. You'll see two tables; one before, and one after the update. You will need a good book that introduces you to some basic SQL-constructions.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]