Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003
    Posts
    21

    Question Unanswered: order by in prepared statement?

    Is it possible to do something like this with a java prepared statement where i have a place holder for the order by clause

    select * from table where id=? order by ?

    TIA

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1

    Re: order by in prepared statement?

    Originally posted by mojojo82
    Is it possible to do something like this with a java prepared statement where i have a place holder for the order by clause

    select * from table where id=? order by ?

    TIA
    NO.
    The closest you can get is to create the STRING containing the SQL
    statement & the use EXECUTE IMMEDIATE to "run" it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •