0

I'm using Squirrel SQL with Oracle. I often have to write quick queries for tables with longish names. It would be nice if I could give aliases to them and write queries like "select * from ft where n='blah'" instead of "select * from footablelongname where nameField='blah'".

I wouldn't use that sort of thing in applications, but it would be nice for off the cuff queries.

In theory I suppose I could create a new view for each one, but in it would be nice to be able to do this in Squirrel SQL.

OMG Ponies
  • 325,700
  • 82
  • 523
  • 502
HappyEngineer
  • 4,017
  • 9
  • 46
  • 60

3 Answers3

2

You could use synonyms for this, but I personally wouldn't recommend it - sure, you save a few characters typing, but you make things much worse for anyone maintaining your code later.

Jeffrey Kemp
  • 59,135
  • 14
  • 106
  • 158
1

Get AutoCompletion ;-) Oracle's free SQL Developer has a nicely working one.

al.
  • 687
  • 3
  • 12
0

In the "Objects" tab right-click on the table name and select "Copy Object Name" or "Copy Qualified Object Name" and paste it into the SQL tab.

redcayuga
  • 1,241
  • 6
  • 4