Sql server® 2012 t-sql fundamentals


   Microsoft SQL Server 2012 T-SQL Fundamentals 1-1



Download 10,93 Mb.
Pdf ko'rish
bet329/443
Sana26.01.2022
Hajmi10,93 Mb.
#411755
1   ...   325   326   327   328   329   330   331   332   ...   443
Bog'liq
BookSQL

288  

Microsoft SQL Server 2012 T-SQL Fundamentals



1-1

Insert into the dbo.Customers table a row with:



custid: 100





companyname: Coho Winery



country: USA





region: WA



city: Redmond



1-2

Insert into the dbo.Customers table all customers from Sales.Customers who placed orders.



1-3

Use a SELECT INTO statement to create and populate the dbo.Orders table with orders from the 



Sales.Orders table that were placed in the years 2006 through 2008. Note that this exercise can only 

 be practiced in an on-premises SQL Server, because SQL Database doesn’t support the SELECT INTO 

statement. In SQL Database, use a CREATE TABLE and INSERT SELECT statements instead.

2

Delete from the dbo.Orders table orders that were placed before August 2006. Use the OUTPUT 

clause to return the orderid and orderdate of the deleted orders.



Desired output:

orderid     orderdate 

----------- ----------------------- 

10248       2006-07-04 00:00:00.000 

10249       2006-07-05 00:00:00.000 

10250       2006-07-08 00:00:00.000 

10251       2006-07-08 00:00:00.000 

10252       2006-07-09 00:00:00.000 

10253       2006-07-10 00:00:00.000 

10254       2006-07-11 00:00:00.000 

10255       2006-07-12 00:00:00.000 

10256       2006-07-15 00:00:00.000 

10257       2006-07-16 00:00:00.000 

10258       2006-07-17 00:00:00.000 

10259       2006-07-18 00:00:00.000 

10260       2006-07-19 00:00:00.000 

10261       2006-07-19 00:00:00.000 

10262       2006-07-22 00:00:00.000 

10263       2006-07-23 00:00:00.000 

10264       2006-07-24 00:00:00.000 

www.it-ebooks.info




Download 10,93 Mb.

Do'stlaringiz bilan baham:
1   ...   325   326   327   328   329   330   331   332   ...   443




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish