CREATE TABLE as SELECT * FROM and insert to select from two table copy statement differences[SQL]View PlainCopy
Create table targer_table as select * from source_table
INSERT INTO target_table (column1,column2) select Column1,column2
SQL statement + select top usage of "Fetch 10th to 20th records from a data table", 10th SQL statements
1. First, select top usage:
For more information, see the differences between select top n * from and select * from.
Select * from table --
Link: http://www.it118.org/Specials/c9fba99e-4401-49cf-8256-ac3c1a34c0d9/cf2a7ceb-1815-43fe-8810-47af11ac65a9.htm
Two methods can be implemented without using a cursor. The following two methods provide better performance than a cursor.
1. INSERT
Select into and insert into select table copy statements
Insert is a common statement in T-SQL. insert into table (field1, field2,...) values (value1, value2 ,...)ProgramDevelopment is indispensable. However, during the development and testing
--Table data query---- basic query of data ---- simple query of data --SELECT * | field name [, field Name 2, ...] from data table name [WHERE condition expression]Cases:Use Commodity Management databaseGoSELECT * From commodity information
SQL Study Notes (14) ------------ data table, SQL statement for creating a data table
Operations on Data TablesBasic Database OperationsWith MySQL, you can choose between the three basic database table formats (version 3.23. When creating a table,
Management of 1.Oracle Tables
Naming conventions for table and column names:
Must start with a letter;
Length cannot exceed 30 characters;
Cannot use Oracle's reserved words;
Use only the following characters: A-Z, A-Z, 0-9,
transferred from: http://blog.csdn.net/lifuxiangcaohui/article/details/40588929Hive is based on the Hadoop distributed File system, and its data is stored in a Hadoop Distributed file system. Hive itself does not have a specific data storage format
Select 1 from table, select any col from table (any Col was any row of purpose collection), select * FROM table acting as There is no difference, is to check whether there is data records, is generally used to do the conditions. Select 1 from table 1
The syntax is as follows:1. Description: copy a table (only copy structure, source table name: a new table name: B) (access available)Method 1: Select * into B from a where 1 <> 1Method 2: Select top 0 * into B from
2. Description: copy a table
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.