December 7, 2010 at 9:50 pm #12186
I often have the need to create a new table that closely resembles a currently existing one.
I’d like to generate the create table SQL to the clipboard or the current query editor window, and then from there tweak it as needed to create the new table.
This feature is available in MS SQL Studio, and I use it a lot when working over there on the dark side.
Thanks for the consideration.
December 8, 2010 at 5:49 am #31655
Hi,Quote:I’d like to generate the create table SQL to the clipboard or the current query editor window, and then from there tweak it as needed to create the new table.
This feature is available in MS SQL Studio.
You could try the following options to get the create table statement in SQLyog:
1. If you are interested in just viewing/copying the create table statement then select that particular table and click on the info tab. This will display the create table statement for you. If you want to copy it then select the option that reads text/detailed and copy the statement into the editor.
2. If you want to duplicate the table then there is an easier option to do so. All you have to do is right click on the table, select more table operations and then select duplicate table structure/data . Once you select this, the duplicate table window will pop up. You have options to duplicate both the structure of the table and the structure and data as well. Please see the attached screen shots that will help you understand both the steps better.
December 8, 2010 at 3:58 pm #31656
OK, the create table SQL on the INFO tab is exactly what I was looking for.
September 6, 2015 at 11:59 am #31657
i want to create a view of a table how could i create my view of atable in sqlyog …. i am new to sqlyog please help me in that regard.
Table of which i want to create view is products_image in attached
September 7, 2015 at 7:20 am #31658
If you already have a table the simplest way to create a “view of a table in sqlyog” is CREATE VIEW viewname AS SELECT * fRM tablename;”. But why would you want to do this?
Besdies a VIEW is a server-side and not a cleint-side object. Maybe I don’t understand what you mean?
You must be logged in to reply to this topic.