Catégories : Tous - insert - create - update - table

par leonardo contreras Il y a 6 années

157

sentences

The given text outlines several fundamental SQL commands essential for managing data within a database. The INSERT command is used to add new rows to a table, following a specific format that includes the table and column names.

sentences

sentences

Insert

Add rows of data to a table.
The general format is: INSERT INTO table_name (column_name, …) VALUES (column_value, …); or INSERT INTO table_name VALUES (column_value, …);

Create Table

The SQL CREATE TABLE command is used to create a database table and defines its data columns.
It has the following format: CREATE TABLE tablename (column_name datatype [constraint_name constraint type], …..)

Delete

Delete rows of data from a table.
The general format is: DELETE FROM tablename WHERE condition(s); e.g. DELETE FROM company WHERE company_ID = 10;

Update

To change a column value in a row or rows the UPDATE command can be used.
This has the following format UPDATE tablename SET condition WHERE condition e.g. UPDATE company SET company_name = ‘BMB’ WHERE company_ID = 10;