relational database is a database that organizes information into one or more tables
A table is a collection of data organized into rows and columns. Tables are sometimes referred to as relations
Some of the most common data types are:
1. Integer, a positive or negative whole number
2. Text, a text string
3. Date, the date formatted as YYYY-MM-DD for the year, month, and day
4. Real, a decimal value
---------------------------------------------------------------------------
------------------------------------------------------------------------
create table celebs (id integer,name text,age integer);
----------------------------------------------
insert into celebs(id,name,age)
values(2,'beyonce knowles',33);
insert into celebs(id,name,age)
values(3,'jeremy lin',26);
insert into celebs(id,name,age)
values(4,'taylor swift',26);
select name from celebs;
-------------------------------------
update celebs
set age=22
where id=1;
select * from celebs;
A table is a collection of data organized into rows and columns. Tables are sometimes referred to as relations
Some of the most common data types are:
1. Integer, a positive or negative whole number
2. Text, a text string
3. Date, the date formatted as YYYY-MM-DD for the year, month, and day
4. Real, a decimal value
---------------------------------------------------------------------------
------------------------------------------------------------------------
create table celebs (id integer,name text,age integer);
----------------------------------------------
insert into celebs(id,name,age)
values(2,'beyonce knowles',33);
insert into celebs(id,name,age)
values(3,'jeremy lin',26);
insert into celebs(id,name,age)
values(4,'taylor swift',26);
select name from celebs;
-------------------------------------
update celebs
set age=22
where id=1;
select * from celebs;
No comments:
Post a Comment