Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql ifnull

##syntax:
SELECT IFNULL(col_with_null_value, default_value);

##you can see the result select with the string NA where the document is null:
SELECT IFNULL(user_document_id, 'NA');
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql change auto_increment start value 
Sql :: sql update null values 
Sql :: change default schema sql server 
Sql :: drop table with constraints 
Sql :: psql select unique 
Sql :: postgres copy table from one schema to another 
Sql :: SQL Remove Index From Tables 
Sql :: mysql add text to existing field 
Sql :: pl/sql loop example 
Sql :: sql server concat string and int 
Sql :: SQL Auto Increment Primary Key - SQL Server 
Sql :: how to connect to xampp sql server on windows cmd 
Sql :: how to find sql server agent jobs related to a database 
Sql :: creating a table in sql 
Sql :: How to check event scheduler status mysql 
Sql :: enable sql server full text indexing 
Sql :: select sequence oracle 
Sql :: error code 1451 sql 
Sql :: sql update table set text to lowercase 
Sql :: mysql query single row 
Sql :: sql blank vs null 
Sql :: oracle list dates without weekends 
Sql :: replace null value within column mysql 
Sql :: does insert into overwrite sql 
Sql :: oracle tablespace tables list 
Sql :: restroe pg_dump example 
Sql :: sum query in sql 
Sql :: psql create user 
Sql :: sqlite get last 
Sql :: oracle drop job if exists 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =