Why the following query have different behavior according with syntax
SYNTAX 1
sqlplus -silent $conn <<EOF
select 'aman' from dual;
EXIT;
EOF
SYNTAX 2
resultset2=`sqlplus -silent $conn <<EOF
select 'aman' from dual;
EXIT;
EOF
`
SYNTAX 3
resultset2=$(sqlplus -silent $conn<<EOF
select 'aman' from dual;
EXIT;
EOF
)
Syntax 1 and 2 are working fine but syntax 3 gives me error
ORA-00904: "aman": invalid identifier