參考:https://community.oracle.com/message/3788432
select deptno,
rtrim (xmlagg (xmlelement (e, ename || ',')).extract ('//text()'), ',') enames
from emp
group by deptno
select deptno,
rtrim (xmlagg (xmlelement (e, ename || ',')).extract ('//text()'), ',') enames
from emp
group by deptno
Date date1 = sdf.parse("2009-12-31"); Date date2 = sdf.parse("2010-01-31"); System.out.println(sdf.format(date1)); System.out.println(sdf.format(date2)); if(date1.compareTo(date2)>0){ System.out.println("Date1 is after Date2"); }else if(date1.compareTo(date2)<0){ System.out.println("Date1 is before Date2"); }else if(date1.compareTo(date2)==0){ System.out.println("Date1 is equal to Date2"); }else{ System.out.println("How to get here?"); }
package net.roseindia.java;
import java.util.HashMap;
public class HashMapContainsKey {
public static void main(String[] arr) {
/* Create object of HashMap */
HashMap<Integer, String> obMap = new HashMap<Integer, String>();
/* Add value in HashMap */
obMap.put(new Integer(1), "Bharat");
obMap.put(new Integer(2), "Gyan");
obMap.put(new Integer(4), "Vrishti");
obMap.put(new Integer(3), "Sarika");
obMap.put(new Integer(5), "Rohit");
obMap.put(new Integer(6), "Parineeta");
/* Check key present in HashMap or not */
System.out.println("Returns :" + obMap.containsKey(1));
System.out.println("Returns :" + obMap.containsKey(8)); } }
|
$('input[name="firstname"]:checked').val();
select regexp_substr(mystring,'[^,]+',1,level) element
from dual
connect by level <= length(regexp_replace(mystring,'[^,]+')) + 1
Reference: