Click here to Skip to main content
15,878,959 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi to all,
I have a table in mysql in which there are 8 columns among that I want to insert 5 values from another table using select statement and remaining 3 want to insert using parameters sent from the code behind. How it is possible? Please help me...Thanks in advance...
Posted

1 solution

Check this example

SQL
BEGIN
DECLARE @FINE VARCHAR(20)
DECLARE @DAYS_LATE INT
SET @FINE=12
SET @DAYS_LATE=2
INSERT INTO FINE(ACCNO,PATNUM,FINE,DAYS_LATE)
SELECT ACCNO,PATNUM,(SELECT @FINE),(SELECT @DAYS_LATE) FROM HIRE

END
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900