Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql stored procedure update if parameter is not null

Update [Users]
set    FirstName = IsNull(@FirstName, FirstName),
	   -- If you want to check for empty strings as well
       City = ISNULL(NULLIF(@City, ''), City),
       ....
Where  ...
Comment

PREVIOUS NEXT
Code Example
Sql :: intellij mysql set timezone 
Sql :: delete row by id mysql 
Sql :: if mysql 
Sql :: Add image in MySQL database 
Sql :: sql rtrim 
Sql :: sqlalchemy empty table 
Sql :: sql joins 
Sql :: mysql dump with table query 
Sql :: pivot 
Sql :: change column name mysql 
Sql :: how to get initials in sql 
Sql :: how to find unique key in sql 
Sql :: oracle change tablespace size 
Sql :: sqlite show table structure 
Sql :: command to give readonly access to a postgres sql user 
Sql :: create table mysql integer NOT null 
Sql :: sql server change column data type 
Sql :: how to declare a variable in sql 
Sql :: How to import CSV file into a MySQL table 
Sql :: mysql find_in_set join 
Sql :: oracle sql number to varchar2 
Sql :: oracle sql average 
Sql :: run docker container with database as rds metabase 
Sql :: postgresql newline character 
Sql :: Grant privileges of databse to user 
Sql :: creating a view in sql 
Sql :: EnvironmentError: mysql_config not found 
Sql :: forcefully delete a row in mysql which has references 
Sql :: setval in postgres 
Sql :: BigQuery Remove Duplicate Keys From Table 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =