Sql basic command
I explain the sql basic command go to shell SHOW DATABASES; it show all the databases USE To select the any databased SHOW TABLES to show all the table CREATE DATABSED to create a databased name CREATE TABLE { [data type], [data type], [data type] }; To create a table and add col in the table DESC to show the structure and description on the table INSERT INTO (col1,col2,col3...)VALUES(,value2>,); SELECT FROM if use * it select all the column SELECT * FROM WHERE {Condition} condition will be comaparison = ==, LIKE ,%,%_% SELECT * FROM WHERE {Condition} ORDER BY {colname} LIMIT {no} if you write the order by ascending order if you write ORDER BY DESC -descending order
I explain the sql basic command
go to shell
SHOW DATABASES;
it show all the databases
USE
To select the any databased
SHOW TABLES
to show all the table
CREATE DATABSED
to create a databased name
CREATE TABLE {
[data type],
[data type],
[data type]
};
To create a table and add col in the table