Search
 
SCRIPT & CODE EXAMPLE
 

SQL

select only distinct values from another table and excluding from current table

INSERT INTO Table2(Id) SELECT DISTINCT Id FROM Table1 WHERE Id NOT IN(SELECT Id FROM Table2);
Comment

PREVIOUS NEXT
Code Example
Sql :: SQL FETCH FIRST Clause 
Sql :: postgresql delete cascade 
Sql :: mysql query to select the highest value 
Sql :: sql comments 
Sql :: sql or 
Sql :: mysql sql.gz 
Sql :: unique key in sql 
Sql :: how to find first 3 highest salary in sql 
Sql :: forgot postgres password 
Sql :: frename oracle 
Sql :: Caused by: java.lang.RuntimeException: Unable to obtain credentials to communicate with the Cloud SQL API 
Sql :: Rows, INSERT INTO, Returning 
Sql :: get last record deluge 
Sql :: mysql grouping functions 
Sql :: python sqlalchemy orm to select null values 
Sql :: Unable to locate package libmysql-java 
Sql :: mariadb search columns 
Sql :: drop domain postgresql 
Sql :: mysql average from two table 
Sql :: oracle undo usage per session 
Sql :: illuminate database queryexception could not find driver (sql select * from 
Sql :: sql join on wildcard 
Sql :: take sql dump in to file 
Sql :: mysql create table 
Sql :: Order of execution SQL or MySql query Or Logical order of operations: 
Sql :: how to reset the identity column in sql server 
Sql :: how to switch database in psql 
Sql :: join three tables sql 
Sql :: oracle job session 
Sql :: synonym oracle 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =