avatar
SQL Commands MySQL

Create Table

CREATE TABLE table_name (
  column_1 datatype_1, 
  column_2 datatype_2, 
  column_3 datatype_3
);

Create Table with Specific Type of Data.

CREATE TABLE Persons (
    PersonID int,
    LastName varchar(255),
    FirstName varchar(255),
    Address varchar(255),
    City varchar(255)
);

Modify Table

// Add 
ALTER TABLE table_name 
ADD column_name datatype;

// Update column (MYSQL)
AFTER TABLE table_name
RENAME COLUMN column_one TO column_two;

// Update column (Oracle)


// Delete
ALTER TABLE Customers
DROP COLUMN ContactName;


Database reference here: https://www.1keydata.com/sql/sql-alter-table.html

24
install git how to configure git username and email globally
You need to login to do this manipulation!