SQL Code Create table LibreDatabase

asked 2021-04-16 14:31:25 +0200

eleftheros gravatar image

Hello guys,

I have some experience in MySQL and I am now trying LibreDatabase where most of the the things I tried they worked.

I am a bit though stuck here as the following simple SQL query will not work.

CREATE TABLE TempTable SELECT * FROM Table1 -- This works on MySQL CREATE TABLE TempTable AS (SELECT * FROM Table1)

Any ideas??

edit retag flag offensive close merge delete

Comments

JohnSUN gravatar imageJohnSUN ( 2021-04-16 14:42:47 +0200 )edit

Thanks JohnSUN for your answer

The proposed solution in your link though of simply renaming the table cannot apply to my case. There is not just a simple select * from a table, there is a larger query that I want its results to be saved on a table

eleftheros gravatar imageeleftheros ( 2021-04-16 14:49:54 +0200 )edit
1

@eleftheros,

There is no such item as LibreDatabase. Base is a front end to databases. LO does have HSQLDB and Firebird embedded databases available for you to use but is not restricted to those.

You can use MySQL (and many others) with Base. Just tested your SQL using JDBC connection to MySQL v8.0.23 on Ubuntu 20.04 and there was no issue creating from menu Tools->SQL.

Or if you don't want to go in that direction, what about creating a View?

Ratslinger gravatar imageRatslinger ( 2021-04-16 21:07:14 +0200 )edit

@Ratslinger You are right, I meant LibreOffice Base, it was the first time I used it on Friday! Well since MySQL is more server targeted, I thought LibreOffice Base could do some simple tasks I wanted to, but till now I found an other solution. If I wanted to insist and use MySQL then I would simply operate it directly from MySQL Workbench with which I am more familiar with.

eleftheros gravatar imageeleftheros ( 2021-04-19 10:08:38 +0200 )edit