Database
Database
10/04/24 2:28 PM
DROP and TRUNCATE are DDL command while DELETE is a DML command.
DELETE remove the specific row based on the given condition.
TRUNCATE removes all the record from the table at once.
DROP command removes the table or databases and as well as the structure.
What is the left outer join and the right outer join in SQL?
• Left outer join: It returns an entire set of records from the left table along with the matched records from the right
table.
• Right outer join: It returns an entire set of records from the right table along with the matched records from the
left table.
___________________________________________
CREATE PROCEDURE SelectAllCustomers @City nvarchar(30), @PostalCode nvarchar(10)
AS
SELECT * FROM Customers WHERE City = @City AND PostalCode = @PostalCode
GO;
Syntax:
ALTER TABLE history ADD INDEX(author(10));
Examples:
○ INT - Standard Integer
○ TINYINT - Very Small Integer
○ SMALLINT - Small Integer
○ MEDIUMINT - Medium-sized Integer
○ BIGINT - Large Integer
○ DECIMAL - Fixed-point number
○ FLOAT - Single-precision floating-point number
○ DOUBLE - Double-precision floating-point number
○ BIT - Bit-field
What is BLOB?
BLOB is an acronym for a binary large object. It is a string data type used to hold a variable amount of data.
___________________________________________
Normalizationis a database design technique that arranges tables in a style that reduces redundancy and dependency
of data. It splits larger tables into smaller tables and links them using relationships. This helps in avoiding fields that
would be null. It also makes sure that all fields in the table only belong to one domain of data being described.