Files
freeCodeCamp/guide/arabic/sql/sql-delete-statement/index.md
2019-06-20 15:35:05 -05:00

34 lines
1012 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: SQL Delete Statement
localeTitle: SQL حذف بيان
---
## SQL حذف بيان
لحذف سجل في جدول تستخدم العبارة `DELETE` .
كن حذرا. يمكنك حذف جميع سجلات الجدول أو مجرد عدد قليل. استخدم شرط `WHERE` لتحديد السجلات التي تريد حذفها. الصيغة هي:
```sql
DELETE FROM table_name
WHERE condition;
```
إليك مثال على الحذف من الجدول Person the record with Id 3:
```sql
DELETE FROM Person
WHERE Id = 3;
```
باستخدام DELETE لإزالة كافة السجلات من جدول محدد
```sql
DELETE * FROM Person
;
```
أو اعتمادًا على RDBMS الخاص بك ، يمكنك استخدام عبارة TRUNCATE TABLE التي تقوم بحذف كافة السجلات من جدول ، كما قد تسمح أو لا تسمح بالتراجع طبقًا لـ RDBMS الخاص بك. DELETE هو DML و TRUNCATE هو DDL.
```sql
TRUNCATE TABLE Person;
```