Unifix knowledge database - The original one

Dashboard - News - Search - List - About - Admin


SQL Queries

Author:mike - Thu Oct 23 21:22:10 2003

Insert data:

insert into TabelName (`Var1`, `Var2`, `Var2`) values ('Content1','Content2','Content2');

Delete data:
delete from TabelName where Var1='Content1';

Update data:
update Tabelname set Var1='More Content' where Var1='Content1';

Queries:
select * from Tablename;
  Show all rows from Tablename

select * from Tablename where Var1='Content';
  Show all rows from Tablename where Var1 contais "Content"

select Var1,Var2 from Tablename where ID<20;
  Show Var1 and Var2 from Tablename with ID lower than 20

select distinct Var1 from TabelName 
  Show all values of Var1 from tablenames except clones

select title from content  where title like "%crac%" and type="dictionary";
   Show all values of content where title containts the letter 'crac' and type is 'dictionary'
Copyright(c) Unifix.org 2002-2011


Dashboard - News - Search - List - About - Admin
 
Powered by Mikjaer Consulting Solutions - Hosted by Specialhosting.dk