Oracle sql中隐式和显式数据类型转换之间的区别是什么

时间:2016-07-15 13:17:58

标签: sql oracle

我需要知道Oracle sql中隐式和显式数据类型转换之间的区别,任何人都可以帮助我

1 个答案:

答案 0 :(得分:1)

这不是家庭作业的问题,现在是吗?

在任何情况下,"明确"类型转换是您在查询或源代码中明确要求的类型:update my table set float_field = 1

"隐含"转换是暗示的转换。例如,如果您1,则从整数1.0到浮点1.0的转换是"隐含的。 " (但是,将public class CoustomTextView extends TextView { private float strokeWidth; private Integer strokeColor; private Paint.Join strokeJoin; private float strokeMiter; public CoustomTextView(Context context) { super(context); init(null); } public CoustomTextView(Context context, AttributeSet attrs) { super(context, attrs); init(attrs); } public CoustomTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(attrs); } public void init(AttributeSet attrs) { if (attrs != null) { TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.CoustomTextView); if (a.hasValue(R.styleable.CoustomTextView_strokeColor)) { float strokeWidth = a.getDimensionPixelSize(R.styleable.CoustomTextView_strokeWidth, 1); int strokeColor = a.getColor(R.styleable.CoustomTextView_strokeColor, 0xff000000); float strokeMiter = a.getDimensionPixelSize(R.styleable.CoustomTextView_strokeMiter, 10); Paint.Join strokeJoin = null; switch (a.getInt(R.styleable.CoustomTextView_strokeJoinStyle, 0)) { case (0): strokeJoin = Paint.Join.MITER; break; case (1): strokeJoin = Paint.Join.BEVEL; break; case (2): strokeJoin = Paint.Join.ROUND; break; } this.setStroke(strokeWidth, strokeColor, strokeJoin, strokeMiter); } } } public void setStroke(float width, int color, Paint.Join join, float miter) { strokeWidth = width; strokeColor = color; strokeJoin = join; strokeMiter = miter; } @Override public void onDraw(Canvas canvas) { super.onDraw(canvas); int restoreColor = this.getCurrentTextColor(); if (strokeColor != null) { TextPaint paint = this.getPaint(); paint.setStyle(Paint.Style.STROKE); paint.setStrokeJoin(strokeJoin); paint.setStrokeMiter(strokeMiter); this.setTextColor(strokeColor); paint.setStrokeWidth(strokeWidth); super.onDraw(canvas); paint.setStyle(Paint.Style.FILL); this.setTextColor(restoreColor); } } } 分配给整数字段应该是一个错误。)