Ms_ Dev

Ms_ Dev

  • NA
  • 236
  • 92.5k

MySQL Stored procedure : Declare variables and insert

Dec 27 2017 1:07 AM
Hi,
 
I want to declare some variables statically and i want to insert it into tables.
 
I have following code:
 
  1.  declare IN Type varchar(30) = 'ABC',   
  2.          IN Zone varchar(30) = 'A1',  
  3.          IN Contact varchar(30)='9887766',   
  4.          IN Contact2 varchar(30) = '782763'  
  5. BEGIN  
  6.   
  7. INSERT INTO agent   
  8.                     VALUES  
  9.    (Type, Zone, Contact, Contact2)  
  10. END   
I am not able to insert values into table..
 
Please refine this script so that i can execute and insert values to table via this. 

Answers (4)