Connect with us

SQL

SQL Indexes

mm

Published

on

Indexes are extraordinary lookup tables that the database web crawler can use to accelerate information recovery. Basically, a list is a pointer to information in a table.
An index speeds up SELECT questions and WHERE provisions, yet it backs off information data, with UPDATE and INSERT proclamations. Lists can be made or dropped with no impact on the information.
Making a index includes the CREATE INDEX proclamation, which permits you to name the list, to determine the table and which section or segments to list, and to show whether the list is in rising or plunging request.
The CREATE INDEX Syntax:-
CREATE INDEX index_name ON table_name;
Single-Column Indexes Syntax:-
CREATE INDEX index_name ON table_name (column_name);
Unique Indexes Syntax:-
CREATE UNIQUE INDEX index_name on table_name (column_name);
Composite Indexes Syntax:-
CREATE INDEX index_name on table_name (column1, column2);
DROP INDEX Syntax:-
DROP INDEX index_name;

Also Read :   SQL Delete

Hi, Thank you for reading my article. I am Victor, a professional blogger from Jaipur, India.I started webetutorial for blogging & sharing solution for developer questions, and now it’s empowering globally by helping them to make money.I am writing about starting & managing a blogs, WordPress, Magento, Social Media, SEO, Marketing, making money online, Investment, Finance, Gadgets, Fitness and more.

Continue Reading
Advertisement
Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

thirteen − two =

SQL

SQL Alter Table

mm

Published

on

The SQL ALTER TABLE is used to add, delete or modify columns in an existing table.
SQL Alter Table:-
ALTER TABLE table_name ADD column_name datatype

Drop Column:-

ALTER TABLE table_name DROP COLUMN column_name;

Add Unique Constraint:-

ALTER TABLE table_name ADD CONSTRAINT MyUniqueConstraint UNIQUE(column1, column2…);

Add Primary Key:-

ALTER TABLE table_name ADD CONSTRAINT PrimaryKey PRIMARY KEY (column1, column2…);

Also Read :   SQL Delete
Continue Reading

Subscribe to our newsletter

Enter your email address to subscribe to blog and receive notifications of new articles by email.
100% Privacy. No spam guaranteed

Trending