Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

table with name "order" : invalid table name

I understand why. I know, this name is really not valid. But this table exists in my DB. I can't rename it. I have no permission. But, may be, there is a some choice for me? How can I execute something like

select COUNT(*) from "order";

? Thanks.

Obs: Thanks for all, problem resolved.

like image 290
Kirill A. Avatar asked Mar 23 '26 22:03

Kirill A.


2 Answers

Oracle stores table names in upper case, so you need:

SELECT count(*) 
FROM "ORDER"

This works for me in Oracle

create table "order" (c1 number);

Table created.

select COUNT(*) from "order"

COUNT(*) 0

like image 29
Torres Avatar answered Mar 26 '26 14:03

Torres



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!