Skip to content
Advertisement

How to access a table with username with special characters in Oracle sql Developer

I have the following usernames/schema:

  1. shopping
  2. shops[shopping]

In both users I created a table named “SHOP_TAKE_CART”, I use shopping for testing purposes and shops[shopping] to publish it. Now I want to compare both tables to see if the data I have in the user shops[shopping] is the same in shopping, but I can’t…

When I open connection in shopping and execute the following select:

Select * from shops[shopping].SHOP_TAKE_CART;

shows me the following error:

ORA-00933: SQL command not properly ended

And when I open connection in shops[shopping] and try:

Select * from shopping.SHOP_TAKE_CART; 

shows me the data of shops[shopping] and not the data of shopping.

There’s any way I can do a select of shops[shopping]?

Advertisement

Answer

You need double quotes – as defined by the SQL standard:

select * 
from "shops[shopping]".shop_take_cart;
9 People found this is helpful
Advertisement