Ask Your Question
0

Why is the DB::raw query not functional when using Oracle in Laravel?

asked 2023-06-23 20:43:05 +0000

nofretete gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-06-23 21:06:02 +0000

lalupa gravatar image

The DB::raw query is not functional when using Oracle in Laravel because Oracle uses a different syntax for raw queries compared to other SQL databases. Oracle requires a special syntax for raw queries that includes a "FROM DUAL" statement, which is not recognized by the default DB::raw syntax in Laravel. To use raw queries with Oracle in Laravel, you must modify the DB::raw syntax to include the "FROM DUAL" statement, or use a different syntax entirely.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-23 20:43:05 +0000

Seen: 11 times

Last updated: Jun 23 '23