Ask Your Question
2

Can you use the ternary operator in c# dot net to update specific data in a database table without affecting the rest of the data?

asked 2021-04-19 11:00:00 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-04-11 16:00:00 +0000

huitzilopochtli gravatar image

No, the ternary operator in C# is just a shorthand version of an if-else statement and does not have any direct connection to the database. To update specific data in a database table, you would need to use SQL statements such as UPDATE or INSERT, combined with WHERE clauses to specify the specific rows that you want to update. You can use conditional statements within your SQL statements, but it is not related to the ternary operator in C#.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-04-19 11:00:00 +0000

Seen: 8 times

Last updated: Apr 11 '22