Databases MYSQL Databases by samsoftdollar

VIEWS: 13 PAGES: 1

									MYSQL Databases
A database is a stored collection of related data. Data are stored in tables in the database. SQL – Structured Query Language Create a database create database database_Name; Eg: create database school; Create a table create table table_Name(Field1 datatype primary key, Field2 datatype, Field3 datatype); Eg: create table student(studid varchar(10) not null primary key, name varchar(30),telno int); Insert Values to a table insert into table_Name values(value_Field1, value_Field2, value_Field3); Eg: insert into student values( ‘Ag01075’,’Kamal Samaranayake’,0777145252); Simple queries in SQL select Field1,Field2, Field3 from table_name; Eg: select studid,name,telno from student; select * from table_name where Field1=”value”; select * from student where studid=”Ag01075”;

Eg:

HTML/Java Scripts  Indunil Gunawardana (B. Sc – University Of Peradeniya) 

1


								
To top