Ask Your Question

How do I rename a view in Base?

asked 2018-03-23 02:13:19 +0200

Ted L. gravatar image

I've created a simple view of my database and don't like the name I picked. How do I rename the view? The "rename" option under edit is grayed out when I select the view. It is not grayed out if, for instance, I select the table itself. I can find instructions on the web about how to rename a table using an SQL command (ALTER TABLE name RENAME TO newname) but that doesn't work on the view, even though the view is treated as it were a table in other respects.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-03-23 03:01:13 +0200

Ratslinger gravatar image

updated 2018-03-23 03:07:28 +0200


Don't know of any way to rename a View. Must create a new one with correct name.

Creating the new one is easy. Right click the original name & 'Edit in SQL View'. Copy & place into new one.

edit flag offensive delete link more


Thanks! I thought of something like that, but didn't know about Edit in SQLView. It would be a bit messy if the view were complicated, but since mine wasn't it was easy. I'm tempted to submit the ability to rename a view as a bug or enhancement, but don't think I'll bother.

Ted L. gravatar imageTed L. ( 2018-03-23 03:25:35 +0200 )edit

Don't think a request would help. Other DB's also work this way. Base is NOT the database.

If this answers your question please tick the ✔ (upper left area of answer). It helps others to know there was an accepted answer.

Ratslinger gravatar imageRatslinger ( 2018-03-23 03:43:41 +0200 )edit

I'm not sure what you are saying. If you are using Base to access a database created by something else, without copying, you would be limited by the features of that implementation. But if you are working with a database created by Base, contained in a Base file, I can see no reason why you shouldn't be able to rename a view. LibreOffice seems to pride itself in adding features that the systems it is mimicking don't have, so I almost take your response as a challenge to submit a bug request!

Ted L. gravatar imageTed L. ( 2018-03-23 14:37:28 +0200 )edit

You would be wasting your time & others. Base is only a front end to databases. The View is contained in and controlled by the the actual database. If the database doesn't allow something (in this case renaming the View) there is nothing Base can to. It can't change the functionality of the database itself.

You do not have a clear concept of the creation. Base is NOT creating the DB. It is only sending a command to the DB for it to be created.

Ratslinger gravatar imageRatslinger ( 2018-03-23 15:37:51 +0200 )edit

HSQLDB v1.8 embedded is NOT part of Base. It is a separate entity. It ships with LO as a convenience so one doesn't have to go through the effort to get their own. This DB is not an LO creation. Unfortunately it is a very old version and is intended (someday) to be replaced by FireBird embedded.

Ratslinger gravatar imageRatslinger ( 2018-03-23 15:42:04 +0200 )edit

Just one other note on View. While renaming is not allowed in v1.8 (default with Base), you can do this in v2.x:

ALTER Table "View1" RENAME TO "MyView"
Ratslinger gravatar imageRatslinger ( 2018-03-23 19:10:01 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-03-23 02:13:19 +0200

Seen: 178 times

Last updated: Mar 23 '18