q2K BHP
Black History Portal
THE BHP WIRE —
HIDDEN TRUTHS
What's New!
THE JOURNEY THROUGH TIME

Explore Black History

Explore the people, places, events, achievements, struggles and stories that shaped our journey.

✊🏾

Civil Rights

Movements, leaders, victories and the continuing fight for equality.

⚙️

Black Inventors

Innovation, patents, science, technology and world-changing contributions.

🏆

Sports

Pioneers, champions, Negro Leagues, records, activism and excellence.

♟️

People

Meet the people whose lives, choices and achievements shaped the journey.

📍

Places

Black towns, communities, institutions and places where history happened.

📜

Events

Moments that changed communities, movements, institutions and the nation.

Enter a person, place, event, or topic.
MY'STORY

The MOVE Fire

This is a personal recollection on the Move fire on May 13, 1985 Philadelphia police fired thousands of rounds at the MOVE house, city officials approved dropping an explosive device on the roof, the resulting fire was allowed to burn, 11 people—including five children—died, and 61 homes were destroyed. Philadelphia City Council later called it a “brutal attack carried out by the City of Philadelphia on its own citizens” and acknowledged that no individual faced criminal consequences for the bombing. One timeline correction worth preserving for the BHP record: the major previous MOVE-police confrontation was August 8, 1978, about seven years before the bombing, not a year or two earlier. Officer James Ramp was killed, other police and firefighters were wounded, nine MOVE members were later convicted, and television cameras recorded police beating Delbert Africa during his arrest. The 1985 MOVE Commission later specifically criticized city planners for failing to adequately use lessons from that 1978 confrontation. And that actually strengthens the point you’re making: 1985 did not happen without precedent or institutional memory. There had already been a deadly confrontation with MOVE, years of conflict, negotiations and police involvement before Osage Avenue.

MORE →
BLACK FACTS
The Truths They Never Taught You...

Katherine Johnson — Mathematics to the Moon

Katherine Johnson’s mathematical calculations helped guide some of America’s most important early space missions while she confronted the racial and gender barriers faced by Black women in twentieth-century America.

MORE →
BHP gathered finds from its connected research sources. Showing the 4 strongest Black History matches.
← BACK TO RESULTS
Wikipedia

Delete (SQL)

In the database structured query language (SQL), the DELETE statement is used to remove one or more rows from a table.[1]: 428  A subset may be defined for deletion using a condition, otherwise all records are removed.[2] Some database management systems (DBMSs), like MySQL, allow deletion of rows from multiple tables with one DELETE statement (this is sometimes called multi-table DELETE).

It is not possible to delete individual values using DELETE, instead UPDATE should be used to set the value to NULL.[1]: 428  Backups should always be created before using DELETE.[1]: 429 

Examples

[edit]

Delete rows from table pies where column flavor equals Lemon Meringue:

DELETE FROM pies
 WHERE flavor='Lemon Meringue';

Delete rows in trees, if the value of height is smaller than 80.

DELETE FROM trees
 WHERE height < 80;

Delete all rows from mytable:

DELETE FROM mytable;

Delete rows from mytable using a subquery in the where condition:

DELETE FROM mytable
 WHERE id IN (
       SELECT id
         FROM mytable2
      );

Delete rows from mytable using a list of values:

DELETE FROM mytable
 WHERE id IN (
       value1,
       value2,
       value3,
       value4,
       value5
      );
[edit]

Suppose there is a simple database that lists people and addresses. More than one person can live at a particular address and a person can live at more than one address (this is an example of a many-to-many relationship). The database only has three tables, person, address, and pa, with the following data:

person
pid name
1 Joe
2 Bob
3 Ann
address
aid description
100 2001 Main St.
200 35 Pico Blvd.
pa
pid aid
1 100
2 100
3 100
1 200

The pa table relates the person and address tables, showing that Joe, Bob and Ann all live at 2001 Main Street, but Joe also takes up residence on Pico Boulevard.

In order to remove joe from the database, two deletes must be executed:

 DELETE FROM person WHERE pid=1;
 DELETE FROM pa WHERE pid=1;

To maintain referential integrity, Joe's records must be removed from both person and pa. It could be that beyond just having three tables, the database also has been set up with a trigger so that whenever a row is deleted from person any linked rows would be deleted from pa. Then the first statement:

 DELETE FROM person WHERE pid=1;

would automatically trigger the second:

 DELETE FROM pa WHERE pid=1;

Features

[edit]
  • It is a DML (Data Manipulation Language) command, therefore the following commands are used for this command: COMMIT and ROLLBACK
  • Deletes all or some records from the table, you can limit the records to be deleted by using the WHERE clause
  • Does not free the space occupied by the data in the table (in the TABLESPACE)
  • Does not reset the SEQUENCE value assigned to the table
  • DELETE works much slower than TRUNCATE
  • You can undo the operation of removing records by using the ROLLBACK command
  • DELETE requires a shared table lock
  • Triggers fire
  • DELETE can be used in the case of: database link
  • DELETE returns the number of records deleted
  • Transaction log - DELETE needs to read records, check constraints, update block, update indexes, and generate redo / undo. All of this takes time, hence it takes time much longer than with TRUNCATE
  • reduces performance during execution - each record in the table is locked for deletion
  • DELETE uses more transaction space than the TRUNCATE statement
  • DELETE can be used with indexed views
  • DELETE generates a small amount of redo and a large amount of undo
  • DELETE operation does not make unusable indexes usable again
[edit]

Deleting all rows from a table can be very time-consuming. Some DBMS[clarification needed] offer a TRUNCATE TABLE command that works a lot quicker, as it only alters metadata and typically does not spend time enforcing constraints or firing triggers.

DELETE only deletes the rows. For deleting a table entirely the DROP command can be used.

References

[edit]
  1. ^ a b c Jon Duckett; Emme Stone; Chris Ullman (2022). PHP & MySQL: server-side web development. Hoboken, New Jersey: John Wiley & Sons, Inc. ISBN 978-1-119-14921-7. LCCN 2021951353. Archived from the original on 30 April 2025. Retrieved 28 April 2026.
  2. ^ "SQL Delete Statement". W3Schools.
[edit]

Source: Wikipedia. Article content is retrieved live through the MediaWiki API.

No preview image
Wikipedia

Delete (SQL)

In the database structured query language (SQL), the DELETE statement is used to remove one or more rows from a table. A subset may be defined for deletion using a condition, otherwise all records are removed. Some database management systems (DBMSs), like MySQL, allow deletion of rows from multiple tables with one DELETE statement (this is sometimes called multi-table DELETE). It is not possible to delete individual values using DELETE, instead UPDATE should be used to set the value to NULL. Backups should always be created before using DELETE.

MORE →
No preview image
Wikipedia

SQL

Structured Query Language (SQL) (pronounced S-Q-L; or alternatively as "sequel") is a domain-specific language used to manage data, especially in a relational database management system (RDBMS). It is particularly useful in handling structured data, i.e., data incorporating relations among entities and variables. Introduced in the 1970s, SQL offered two main advantages over older read–write APIs such as ISAM or VSAM. Firstly, it introduced the concept of accessing many records with one single command. Secondly, it eliminates the need to specify how to reach a record, i.e., with or without an index. Originally based upon relational algebra and tuple relational calculus, SQL consists of many types of statements, which may be informally classed as sublanguages, commonly: data query language (DQL), data definition language (DDL), data control language (DCL), and data manipulation language (DML). The scope of SQL includes data query, data manipulation (insert, update, and delete), data definition (schema creation and modification), and data access control. Although SQL is essentially a declarative language (4GL), it also includes procedural elements. SQL was one of the first commercial languages to use Edgar F. Codd's relational model. The model was described in his influential 1970 paper, "A Relational Model of Data for Large Shared Data Banks". Despite not entirely adhering to the relational model as described by Codd, SQL became the most widely used database language. SQL became a standard of the American National Standards Institute (ANSI) in 1986 and of the International Organization for Standardization (ISO) in 1987. Since then, the standard has been revised multiple times to include a larger set of features and incorporate common extensions. Despite the existence of standards, virtually no implementations in existence adhere to it fully, and most SQL code requires at least some changes before being ported to different database systems.

MORE →
No preview image
Wikipedia

Merge (SQL)

A relational database management system uses SQL MERGE (also called upsert) statements to INSERT new records or UPDATE or DELETE existing records depending on whether condition matches. It was officially introduced in the SQL:2003 standard, and expanded in the SQL:2008 standard.

MORE →
No preview image
Wikipedia

Data control language

A data control language (DCL) is a syntax similar to a computer programming language used to control access to data stored in a database (authorization). In particular, it is a component of Structured Query Language (SQL). Data Control Language is one of the logical groups in SQL Commands. SQL is the standard language for relational database management systems. SQL statements are used to perform tasks such as insert data to a database, delete or update data in a database, or retrieve data from a database. Though database systems use SQL, they also have their own additional proprietary extensions that are usually only used on their system. For example, Microsoft SQL server uses Transact-SQL (T-SQL), which is an extension of SQL. Similarly, Oracle uses PL-SQL, which an Oracle-specific SQL extension. However, the standard SQL commands such as "Select", "Insert", "Update", "Delete", "Create", and "Drop" can be used to accomplish almost everything that one needs to do with a database. Examples of DCL commands include the SQL commands: GRANT to allow specified users to perform specified tasks. REVOKE to remove the user accessibility to database object. The operations for which privileges may be granted to or revoked from a user or role apply to both the Data definition language (DDL) and the Data manipulation language (DML), and may include CONNECT, SELECT, INSERT, UPDATE, DELETE, EXECUTE, and USAGE.

MORE →
TOPIC OF THE DAY

Greenwood / Black Wall Street

Before the 1921 destruction of Tulsa’s Greenwood District, Black residents had created a remarkable center of business and community life. The district included stores, professional offices, entertainment venues and homes owned by Black citizens. Understanding Greenwood means learning what was built—not only what was burned.

MORE →
TRIVIA QUESTION OF THE DAY

Which heavyweight champion was known as the “Brown Bomber”?

Joe Louis.