Search
 
SCRIPT & CODE EXAMPLE
 

SQL

insert using condition postgres

WITH get_cust_code_for_cust_id AS (
    SELECT cust_code FROM cust WHERE cust_id=11
)

INSERT INTO public.table_1(
    cust_code, issue, status, created_on)
    VALUES (SELECT cust_code FROM get_cust_code_for_cust_id, 'New Issue', 'Open', current_timestamp)
Comment

PREVIOUS NEXT
Code Example
Sql :: get comma separated values in mysql with group by 
Sql :: how to average max mysql 
Sql :: tsql find procedure with name 
Sql :: psql attribute cannot login 
Sql :: mssql coalesce 
Sql :: order by with where clause in mysql 
Sql :: sql contains vs like 
Sql :: how to login to mysql in homestead 
Sql :: Question 7: Write an SQL query to print details of the Workers who have joined in Feb’2014. 
Sql :: do block in postgresql 
Sql :: left join sql 
Sql :: macos oracle docker oracle11g 
Sql :: sql alternative to max statement 
Sql :: SQL COMO ALTERA NOME DE TABELA 
Sql :: SQL IN Operator With Subquery 
Sql :: mysql delet from the child table when we delete the rows from the parent 
Sql :: grapgql 
Sql :: mysql copy row with new id 
Sql :: drop a field in psql django 
Sql :: how to fetch data from database without last column 
Sql :: sql like with multiple values 
Sql :: windows could not start the sql server on local computer 
Sql :: sql order by clause 
Sql :: sql select only row with the max date 
Sql :: sql join 3 tables 
Sql :: postgresql add not null and not empty constraint 
Sql :: how to add amount between date in sql 
Sql :: load a log file in that format into MySQL 
Sql :: primary key 
Sql :: is not null sql 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =