如何将现有表中的7000条记录中的前1000条记录复制到其他新表中 [英] how to copy top 1000 records from 7000 records in existing table to other new table

查看:109
本文介绍了如何将现有表中的7000条记录中的前1000条记录复制到其他新表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含超过7k条记录的表A,现在我正在创建一个新表B。在我的新表BI中,只需要从具有7000多个记录的表A中复制1000条记录。

I have a table A which consists more than 7k records,Now i am creating a new table B .In my new table B I need to copy only 1000 records from table A which has more than 7000 records.

没有条件适用,可能是7000条中的任何千条记录。

No condition applies, it may be any thousand records from 7000 .

推荐答案

在SQL中服务器

SELECT top 1000 *
INTO newTableName
FROM oldTableName;

在MySQL中

SELECT *
INTO newTableName
FROM oldTableName Limit 1000;

这篇关于如何将现有表中的7000条记录中的前1000条记录复制到其他新表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆