Sql server® 2012 t-sql fundamentals



Download 10,93 Mb.
Pdf ko'rish
bet307/443
Sana26.01.2022
Hajmi10,93 Mb.
#411755
1   ...   303   304   305   306   307   308   309   310   ...   443
Bog'liq
BookSQL

The 

DELETE

 Statement

The DELETE statement is a standard statement used to delete data from a table based on a predicate. 

The standard statement has only two clauses—the FROM clause, in which you specify the target table 

name, and a WHERE clause, in which you specify a predicate. Only the subset of rows for which the 

predicate evaluates to TRUE will be deleted.

For example, the following statement deletes, from the dbo.Orders table, all orders that were 

placed prior to 2007. 

DELETE FROM dbo.Orders 

WHERE orderdate < '20070101';

Run this statement. SQL Server will report that it deleted 152 rows.

(152 row(s) affected)

Note that the message indicating the number of rows that were affected appears only if the 

 NOCOUNT session option is OFF, which it is by default. If it is ON, SQL Server Management Studio 

will only state that the command completed successfully.

The DELETE statement is fully logged. Therefore, you should expect it to run for a while when you 

delete a large number of rows.

www.it-ebooks.info




Download 10,93 Mb.

Do'stlaringiz bilan baham:
1   ...   303   304   305   306   307   308   309   310   ...   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