Database Reference
In-Depth Information
Table 9-2: Over Clause Output
SalesTerritoryKey
ProductKey
SalesTerritoryOrderQuantitySum
9
562
13345
9
482
13345
9
574
13345
9
541
13345
9
535
13345
9
214
13345
9
538
13345
9
537
13345
9
528
13345
6
483
7620
6
477
7620
6
479
7620
6
222
7620
6
480
7620
6
539
7620
Manipulating data
You can perform three basic types of data manipulation activities on your analytics system. After you
have learned the basics, you can get more sophisticated with your data updates by combining the
other SQL components in this chapter with data manipulation commands to fulfill the requirements.
Insert
An Insert statement appends or adds data to a table. There are three primary ways to insert data
into a table:
Insert with values: This consists of providing a list of values (a single row) that you want to
insert into specific table columns:
insert into dbo.sample (id, name)
values(1,'sample')
Insert with a Select statement: This involves inserting the result set (multiple rows) of a
Select statement into a table. This is a fast way to insert large amounts of data into your
table:
insert into dbo.sample (id, name)
select 1, 'sample'
 
 
Search WWH ::




Custom Search