phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vishal Biradar <vishalb.e...@gmail.com>
Subject How to create new table as existing table with same structure and data ??
Date Thu, 22 Jun 2017 11:43:33 GMT
HBase version : 1.2.6
Phoenix version : 4.10.0-HBase-1.2.6

I am trying to create new table by using the already existing table
but I don't know how to do it ??
I have tried like:

CREATE TABLE "+targerSchemaName+"."+targetTableName+" AS SELECT * FROM
"+schemaName+"."+tableName

and also i tried like:

CREATE TABLE "+targerSchemaName+"."+targetTableName+" Like SELECT *
FROM "+schemaName+"."+tableName

But getting error.
So how to create new table based on existing table in same or
different schema ??
Please help me.

Mime
View raw message