Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

update statement

$
0
0

Hi,

I want update table when user  changes name or add new newname in table.

CREATE TABLE [dbo].[Management_Attendee](
	[attendeeid] [int] IDENTITY(1,1) NOT NULL,
	[attendee1] [nvarchar](50) NULL,
	[ManagementID] [int] NULL,
	) ON [PRIMARY]
id    attendee  managementid
35	ema	25		
36	ema1	25		
37	ema2	25		
38	ema3	25	
39	ema4   25
40	ema5	25	
33	tester	24
34	tester1	24	
Update Management_Attendee SET [attendee1] = @attendee1 where ManagementID = 24

in the above update statement if user want to update  management id=24 then it update  two rows  if I want to update only tester .how can I update  any solutions please?


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>