mybatis 动态SQL语句

1select
	

2.foreach

	
3.update


      update 
	       		SHJLB s  
	       	SET 	       			       		
	      
	              s.SJSHJG = #{SJSHJG,jdbcType=VARCHAR},
	     
	      
	             s.SJSHSM = #{SJSHSM,jdbcType=VARCHAR},
	     
	    
	             s.SJSHRY = #{SJSHRY,jdbcType=VARCHAR},
	    
	     
	             s.SJSHSJ =to_date(#{SJSHSJ},'yyyy-mm-dd hh24:mi:ss')
	    
	    
	    	     	    
	     
	             s.STSHJG = #{STSHJG,jdbcType=VARCHAR},
	     
	      
	             s.STSHSM = #{STSHSM,jdbcType=VARCHAR},
	     
	     
	             s.STSHRY = #{STSHRY,jdbcType=VARCHAR},
	     
	      
	             s.STSHSJ =to_date(#{STSHSJ},'yyyy-mm-dd hh24:mi:ss')
	     	   
         
         
         
	             s.DCJSHJG = #{DCJSHJG,jdbcType=VARCHAR},
	     
	     
	           s.DCJSHSM = #{DCJSHSM,jdbcType=VARCHAR},
	     
	     
	           s.DCJSHRY = #{DCJSHRY,jdbcType=VARCHAR},
	     
	     
	           s.DCJSHSJ =to_date(#{DCJSHSJ},'yyyy-mm-dd hh24:mi:ss')
	     	     	       			       		
	       	WHERE 
	       		s.HCTBID =
          #{HCTBID,jdbcType=VARCHAR}
 
3.insert

	
	  insert into  "DC_FJGLB" t		 
		  (
			"ID",	
			"FJ_ID",	
			"GLBMC",		
			"GLBID"	
		)values(
				#{ID, jdbcType=NUMERIC},
				#{FJ_ID, jdbcType=NUMERIC},
				#{GLBMC, jdbcType=VARCHAR},
				#{GLBID, jdbcType=NUMERIC}
			)
	




你可能感兴趣的:(SQL)