Forum Discussion
How to convert a SQL view into a table?
Can I convert a SQL view into a table to perform the necessary transformations without having to update the data?
Hello YLM1603
try this
CREATE TABLE new_table AS
SELECT * FROM your_view;
Thanks,
Pankaj Namekar | LinkedInIf this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
- Anonymous1 year ago
In SQL Server using TSQL :
select *
into <new_table>
from <database>.<schema>.<view_name>
6 Replies
- pankajnamekar25Super User
Hello YLM1603
try this
CREATE TABLE new_table AS
SELECT * FROM your_view;
Thanks,
Pankaj Namekar | LinkedInIf this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
- AnonymousNot applicable
In SQL Server using TSQL :
select *
into <new_table>
from <database>.<schema>.<view_name> - AnonymousNot applicable
Hi YLM1603
Thank you for reaching out to the Microsoft Fabric community forum. Also thank you Anonymous and pankajnamekar25 for your inputs.
Also, could you confirm which SQL platform you're using (e.g., SQL Server, PostgreSQL, MySQL)? The syntax for converting a view into a table differs slightly depending on the system.
Thank you.
- AnonymousNot applicable
Hi YLM1603 ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
- AnonymousNot applicable
Hi @YLM1603 ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
- AnonymousNot applicable
Hi @YLM1603 ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.