Index in SQL is a special table used to speed up the searching of the data in the database tables.
It also retrieves a vast amount
of data from the tables frequently. The INDEX requires its own space in the hard disk. uses: Faster Searching , Better Combining, Quick Filtering, No Duplicates, Primary Key Helper, Sorting and Grouping Unique Index is the same as the Primary key in SQL. The unique index does not allow selecting those columns which contain duplicate values. CREATE UNIQUE INDEX Index_Name ON Table_Name ( Column_Name); ALTER INDEX old_Index_Name RENAME TO new_Index_Name; ALTER TABLE Table_Name DROP INDEX Index_Name; ALTER INDEX Index_Name ON Table_Name REBUILD; Types of Indexes: 1. Single-Column Index: A list of values from one column. 2. Composite Index: A combined list of values from multiple columns. 3. Unique Index: A list of values where each value appears only once. 4. Clustered Index: The way the rows are physically ordered in the table. 5. Non-Clustered Index: A separate list of values with pointers to the actual rows. 6. Full-Text Index: Helps search for words or phrases within text. Stored procedure: we can retrieve multiple table data,Functions: we can retrieve single table data & we can perform DML operation like select,insert,update, delete. The function must return a value but in Stored Procedure it is optional. Functions can have only input parameters for it whereas Procedures can have input or output parameters. Functions can be called from Procedure whereas Procedures cannot be called from a Function A View represents a virtual table. You can join multiple tables in a view and use the View to present the data as if the data were coming from a single table. A table is structured with columns and rows, while a view is a virtual table extracted from a database. The table is an independent data object while views are usually depending on the table