Suppose I have a table:
SERVICE={SID,NAME,PORT}
and with the help of a Java program, I want to select the SID of the known port with the help of a SQL query:
Select SID from SERVICE where PORT=port
But when I write the code snippet:
String sql="Select SID from SERVICE where PORT=port;";
where port is an integer variable but on execution I get the following error:
No such column port".How to get rid of this error?