Creation and management of SQL databases

In this section we will see the basic statements and instructions, both DDL and DML to start database development: from the creation of a database, modification and deletion, to the insertion of records in the tables it contains and their manipulation

ALTER TABLE statement

ALTER TABLE is the DDL statement to add, remove or modify columns in a table, as well as to add or remove constraints on it. In this section we will see graphically and with examples, how to use this sentence

DROP TABLE statement

DROP TABLE is the DDL statement to drop tables along with all their data, indexes, triggers, constraints, and permissions

Statement BULK INSERT

BULK INSERT is the DML statement that allows you to insert records into a table or view from an external file, usually a CSV file

UPDATE statement

UPDATE is the DML command that allows you to update database records. In other words, UPDATE allows you to modify the values of the columns of the tables respecting the corresponding data type

DELETE statement

DELETE is the DML command to delete records from database tables. In its execution, it is very important to take into account the WHERE clause, to prevent the changes from being propagated and all the records from the table being deleted

TRUNCATE TABLE statement

TRUNCATE TABLE is the DML statement that allows you to delete all the data from a table without affecting its schema and structure. Unlike the DELETE FROM statement, TRUNCATE TABLE does not allow the WHERE clause to be used

CREATE DATABASE statement

CREATE DATABASE, is the DDL statement, which allows us to create databases within our management system. In this section we will learn how to create a specific database, both by SQL commands and by the graphical editing tool

CREATE SCHEMA statement

CREATE SCHEMA is the DDL statement that enables us to create a new schema in a new database. In this section we will see what a schema is, the system's default schemas, how to create them and grant them permissions

CREATE TABLE statement

CREATE TABLE, is the DDL statement that allows you to create tables in a specific database. In this section we will see how to declare the columns along with the data type, properties and restrictions when executing the statement.

GRANT and REVOKE statements

DCL (Data Control Language) is the language in charge of managing access to the database and its contents, mainly through the GRANT statements (to grant permissions) and REVOKE (to eliminate existing permissions.

INSERT INTO statement

INSERT INTO is the DML statement for inserting records into database tables. In this section we will see how to apply the sentence, taking into account the nature of the data, properties and restrictions in handling the information