SQL statement to copy and paste


开发工具与关键技术:SQL Server 2014与SQL

作者:戴怡斌 

撰写时间:2019年6月27日

Many novice started learning to create a database, they are not aware of a database or create a table can use SQL statements, SQL statements, there are a lot of practical value, usually novices do not know, of course, the teacher will say, is not only just beginning these will be.

Previous talked about how to create databases and tables in SQL statements, SQL statements or this one class capacity, the SQL statement in the copy and paste.

Analogy, if I create an employee table, the table which fill a lot of class content on the staff, there are employee name, salary, coding and other employees, and then accidentally found the employee code and employee names exchanged, leading employees to fill employee name went on the coding staff.

This time the SQL statement can solve this problem.
Here Insert Picture Description
Table database resides, because SQL is based on a database to find, the database does not find the table, insert it back into the table name, and then use the mouse to select and click execution, you can put the class you want to copy and paste content you want to class content pasted to the inside, but only copy and paste the same table inside.
Here Insert Picture Description
Be the same for different tables can also copy and paste, for example, I just created a new table, but this table with the table found previously created their own how common, do not want to knock myself again, lazy, copy it.

But keep in mind that different types of tables, then copy and paste, the data will be disorder,

Update: the equivalent modified, but with modifications and a little different, different from the knock to know, with a table replication principle is about the same,

There is, if the data did not come out, do not worry. Refresh it.
Here Insert Picture Description

Guess you like

Origin blog.csdn.net/weixin_44561520/article/details/93969048