Atul Rokade

Atul Rokade

  • 1.7k
  • 141
  • 25.8k

insert query by using select statement

Aug 18 2016 11:44 AM
Hi all
 
Actually i have two tables
Suppose table name is Table A and Table B
in Table A having User_name,Password,Unique_no field
where Table B having User_name,Unique_no,Sales_count, Today_date field
Now, what i want, in Table B when i trying to do insert query at same time query should be extract User_name and Unique_no base on Unique_no condition + query can be insert sales_count+1 and today date also
for this i make a query
insert into Table B select User_name,Unique_no from Table A where Unique_no =@Unique_no
but not understand how can i insert sales_count increament and today date into Table B At same time
 

Answers (9)