answersLogoWhite

0

We can use case statement with update query , for example in Employee table if gender is 'Male' then update this to '1' and gender 'female' with '2' and 'middle sex' with '3'...

t-Sql query : UPDATE Employee SET Gender = CASE Gender WHEN 1 THEN 'Male' WHEN 2 THEN 'Female' ELSE 'MiddleSex' END

User Avatar

Wiki User

9y ago

What else can I help you with?

Related Questions

What is the general format of an SQL query?

In general, SQL "statements" have a Select "clause," a From "clause," and a Where "clause."


What is the SQL UPDATE Query used for?

The SQL UPDATE query is used to update tables when changes have been made or are about to be made It forces the database to be updated and makes sure current information is used for subsequent queries.


What is a query language that allows users to manage update and retrieve data?

SQL


What are the main function in sql?

SQL (Structured Query Language) is a language used in a SQL server to manage data (Query the data, insert, Update, Delete) as well as perform data manipulation (calculations, etc)


What is sql and plsql?

SQL stands for Structured Query Language, and is a computer language designed for writing data manipulation or data management statements against a relational database. PL/SQL stands for Procedural Language/Structured Query Language which is Oracle's proprietary procedural extensions to the SQL language.


What is sql statements?

SQL in database is short for structured query language. There are four types of SQL statements which are as follows : 1) Data retrieval language 2) Data manipulation language 3) Data control language 4) Data definition language


Difference between alter and update commands in sql?

Update and Alter are two SQL (Structured Query Language) commands used for modifying databases. Update statement is used to update existing records in a database. Update is a Data Manipulation Language (DML) statement. Alter SQL command is used to modify, delete or add a column to an existing table in a database. Alter is a Data Definition Language (DDL) statement.Commands that are used to define the structure of a database (database schema) are called DDL statements.


Can SQL be considered as a QUERY language?

The 'Q' and the 'L' in SQL standard for the words 'Query' and 'Language'. So yes. SQL can be considered a query language.


What does sql stands for?

SQL stands for Structured Query Language. SQL is a standard language used to access data in Database Management Systems. Almost all databases implement the standard version of SQL, making it portable across database management systems.


What are the differences between SQL statement to iSQL plus statement?

Structured Query Lanaguage(SQL) is a command language to communicate with oracle server.whereas SQL*PLUS is an oracle tool that recognises and submits sql statements to the oracle server for execution.


What is the use of execute non query in c?

It is not C, it's SQL. Non-query means DML (INSERT, UPDATE, DELETE) and DDL (eg CREATE TABLE).


Examples of database Query?

The database we use is based on structured query language . To add or retrieve data from the database we use SQL . SQL is the structured query language that provides the syntax to add, modify, update or retrieve data from the database.