on 11-24-2015 3:10 PM
Hi
I want to create a table same structure as MARA ..
so how to create a table .
If you want to copy table A, in SAP HANA, you just have to:
CREATE COLUMN TABLE "NAME_TABLE_B" LIKE "NAME_TABLE_A" WITH DATA;
And that's it.
If you don't want to preserve the information: CREATE COLUMN TABLE "NAME_TABLE_B" LIKE "NAME_TABLE_A";
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Surya,
please do your share of documentation research before you post your questions here.
Normally this whole thread would be a "failed to search" case and I would moderate it.
Since some users already put in effort to help you, I will only block this thread this time and provide them with a "helpful answer" reward.
Please do consider before posting new questions and make sure that you look for existing information beforehand.
- Lars
Hi Surya,
please check following options
create column table <<new_Table_name>> as
(
select top 0 * from <<Schema_Name>>."MARA"
);
2. create same table structure with complete records
create column table <<new_Table_name>> as
(
select * from <<Schema_Name>>."MARA"
);
3. create column table "NEW_MARA" like "<<SCHEMA_NAME>>"."MARA";
I hope, this will help you.
Regards,
Vikram Divekar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Surya,
If you want to find the SQL that creates the Table, go to the MARA Table,
Right click on this > Open Definition.
On the top right of the HANA Studio you can click on "Export SQL"
This will open the SQL Editor with the SQL used to create the MARA Table. You can try using this SQL for the structure.
BR
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.