Skip to content

nafungchwi/nafungchwi-Truncate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Background

SQL sublanguage: DDL (Data Definition Language)

The TRUNCATE keyword allows us to remove all records from a table but doesn't delete the table itself.

The syntax for truncating a table:

TRUNCATE TABLE table_name;

Additional reference material if needed: https://www.w3schools.com/sql/sql_drop_table.asp

NOTE: The documentation in W3 schools has a TRUNCATE demo under the DROP TABLE demo.


Lab

Problem

Song Table Diagram:

title artist
'Let it be' 'Beatles'
'Imagine' 'Beatles'
'Kashmir' 'Led Zeppelin'

Problem : in the problem2.sql file, remove all the records from the table "song"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 94.8%
  • Shell 5.2%