INTRO:
SQL is a programming languages designed for managing data. It is used for data storage or database storage. MySQL is the most popular among database management storage system. Others are Oracle, Windows Access, PostgreSQL, SQLite etc. Database are use from Office productivity to storage of various data type.
This tutorial will cover all the basic of the above and more database system..
SQL is a programming languages designed for managing data. It is used for data storage or database storage. MySQL is the most popular among database management storage system. Others are Oracle, Windows Access, PostgreSQL, SQLite etc. Database are use from Office productivity to storage of various data type.
This tutorial will cover all the basic of the above and more database system..
SQL look like this..
SELECT * FROM table
Create a database:
This will create a database with name '
CREATE DATABASE test
test
'.
Create a table:
This will create a table with name '
CREATE TABLE person ( `name` VARCHAR(12), `age` VARCHAR(3), `gender` VARCHAR(6) )
person
' having column name
, age
, gender
.
Add a data to table:
This will add a line into the table
INSERT INTO person (name, age, gender) VALUES ('anil', '18', 'male')
person
to the column name
, age
, gender
with value anil
, 18
, male
respectively.
Check if the data/line has been added:
Output:
SELECT * FROM person
name age gender
anil 18 male
Note:
* the number in
* the number in
VARCHAR(12)
signify only 12 characters will be saved and rest omitted. If we enter a name 'verylonglongname
' (16 char), the saved name will only be 'verylonglong
' (12 char), last 4 char omitted.
No comments:
Post a Comment