java编程中写的sql变量所带的+是起什么作用的呢?带与不带有什么区别?
StringsqlAppTree="select'class_'||APP_CLASS.APP_CLASS_CODENODE_CODE,APP_CLASS.APP_CLA...
String sqlAppTree = "select 'class_'||APP_CLASS.APP_CLASS_CODE NODE_CODE,APP_CLASS.APP_CLASS_NAME NODE_NAME,'class_'||APP_CLASS.MAIN_CLASSIFY UP_NODE_CODE,'' LOCATION_RESOURCE,'' FUNCTION_KEY,APP_CLASS.MAIN_CLASSIFY||APP_CLASS.APP_CLASS_CODE ORDER_COL,order_code FROM APP_CLASS where app_class_code<>'4' UNION "
+ " SELECT 'template_'||APP_TYPE.APP_TYPE_CODE NODE_CODE,decode(APP_TYPE.APP_TYPE_CODE,'1','高压新装、增容、临时','3','非居民低压新装、增容、临时','5','居民低压新装、增容、临时',APP_TYPE.APP_TYPE_NAME) NODE_NAME, 'class_'||APP_CLASS.APP_CLASS_CODE UP_NODE_CODE, LTRIM(RTRIM(APP_TYPE.URL_RESOURCE)) LOCATION_RESOURCE "
+ ",'' FUNCTION_KEY ,APP_TYPE.APP_TYPE_NAME ORDER_COL,APP_TYPE.order_code FROM APP_CLASS,APP_TYPE WHERE ( APP_TYPE.APP_CLASS_CODE = APP_CLASS.APP_CLASS_CODE ) AND APP_TYPE.IS_USING = 'Y' AND APP_TYPE.APP_TYPE_CODE not in ('2','4','6','15',24,'98') "
+ " ORDER BY order_code ";
如以上的变量书写方式。 展开
+ " SELECT 'template_'||APP_TYPE.APP_TYPE_CODE NODE_CODE,decode(APP_TYPE.APP_TYPE_CODE,'1','高压新装、增容、临时','3','非居民低压新装、增容、临时','5','居民低压新装、增容、临时',APP_TYPE.APP_TYPE_NAME) NODE_NAME, 'class_'||APP_CLASS.APP_CLASS_CODE UP_NODE_CODE, LTRIM(RTRIM(APP_TYPE.URL_RESOURCE)) LOCATION_RESOURCE "
+ ",'' FUNCTION_KEY ,APP_TYPE.APP_TYPE_NAME ORDER_COL,APP_TYPE.order_code FROM APP_CLASS,APP_TYPE WHERE ( APP_TYPE.APP_CLASS_CODE = APP_CLASS.APP_CLASS_CODE ) AND APP_TYPE.IS_USING = 'Y' AND APP_TYPE.APP_TYPE_CODE not in ('2','4','6','15',24,'98') "
+ " ORDER BY order_code ";
如以上的变量书写方式。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询