Professional Documents
Culture Documents
https://www.programiz.com/sql/online-compiler/
What is RDBMS?
RDBMS stands for Relational Database Management System. RDBMS is the basis for SQL,
and for all modern database systems like MS SQL Server, IBM DB2, Oracle, MySQL, and
Microsoft Access.
What is a table?
The data in an RDBMS is stored in database objects known as tables. This table is basically
a collection of related data entries and it consists of numerous columns and rows.
What is a field?
Every table is broken up into smaller entities called fields. A field is a column in a table that
is designed to maintain specific information about every record in the table.
For example, our CUSTOMERS table consists of different fields like ID, Name, Age, Salary,
City and Country.
What is a Record or a Row?
A record is also called as a row of data is each individual entry that exists in a table. For
example, there are 2 records in the above CUSTOMERS table. Following is a single row of
data or record in the CUSTOMERS table −
What is a column?
A column is a vertical entity in a table that contains all information associated with a specific
field in a table.
For example, our CUSTOMERS table have different columns to represent ID, Name, Age,
Salary, City and Country.
A NULL value in a table is a value in a field that appears to be blank, which means a field
with a NULL value is a field with no value.
https://www.programiz.com/sql/online-compiler/
Create Table:
);
Output:
EMPLOYEE
ID NAME AGE ADDRESS SALARY
empty
INSERT:
MPLOYEE
ID NAME AGE ADDRESS SALARY
The SQL TRUNCATE TABLE command is used to delete all the records from an
existing table by reinitializing the table's structure.
DELETE TRUNCATE
The DELETE command in SQL removes one or SQL's TRUNCATE command is used to remove
more rows from a table based on the all of the rows from a table, regardless of
conditions specified in a WHERE Clause. whether or not any conditions are met.
Data definition language (DDL) statements let you to perform these tasks:
The CREATE, ALTER, and DROP commands require exclusive access to the specified
object.
Data manipulation language (DML) statements access and manipulate data in existing
schema objects.
Transaction control statements manage changes made by DML statements. The transaction
control statements are:
COMMIT
ROLLBACK
SAVEPOINT
SET TRANSACTION
DROP TRUNCATE
The DROP command in SQL removes an The TRUNCATE command is used to remove all of
entire table from a database including its the rows from a table, regardless of whether or
definition, indexes, constraints, data etc. not any conditions are met and resets the table
definition.
Update command
UPDATE EMPLOYEE
WHERE ID = 1;
EMPLOYEE
ID NAME AGE ADDRESS SALARY
DELETE:
WHERE ID = 1;
EMPLOYEE
ID NAME AGE ADDRESS SALARY
empty
ALTER TABLE:
EMPLOYEE
Mobile
ID NAME AGE ADDRESS SALARY
Numer
empty
DROP
The SQL DROP TABLE statement is a Data Definition Language (DDL) command
that is used to remove a table's definition, and its data, indexes, triggers,
constraints, and permission specifications (if any).
Sytanx
Delete:
The SQL DELETE TABLE command is used to delete the existing records from a
table in a database.
DELETE FROM EMPLOYEE WHERE NAME='ROHAN';