TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
vijay reddy
NA
13
4.4k
Before insert how to check the records if it exists or not
Jul 19 2016 12:10 AM
hi,
I created two tables like
create Table A (pid bigint, pname varchar, psource varchar(10))
create Table #temp (id bigint, name varchar, source varchar(10))
table A having lakhs of rows and table #temp having lakhs of rows
i want to check the records based on #temp table and insert into Table A.
how to check the records before insert values from #temp table to table A
insert into A
(pid,
pname,
psource
)
select
id,
name,
source
from #temp
Please give me the solution for the above query.
Reply
Answers (
9
)
casting to datetime
Unable to access SQL database in SQL sever management