viernes, 15 de enero de 2016

Sqlite Browser and single table




Sqlite Browser

Comand to Install

sudo add-apt-repository ppa:linuxgndu/sqlitebrowser
sudo apt-get update
sudo apt-get install sqlitebrowser



CREATE TABLE Users (
    name VARCHAR (128),
    email VARCHAR (128)
)
 
SQL insert: the insert statement insers a row into a table
INSERT INTO Users (name, email) VALUES ('Kristin', 'kf@umich.edu')

SQL Delete: Deletes a row in a table based on a selection criteria
DELETE FROM Users WHERE email='ted@umich.edu'

SQL Update: Allows the updating of a field with a where clause
UPDATE Users SET name='Charles' WHERE email='csev@umich.edu'

Retrieving Records Select: The select statement retrieving a group of
records - you can either retrieve all the records or a subset of the
with a WHERE clause.
SELECT * FROM Users
SELECT * FROM Users WHERE email='csev@umich.edu'

Sorting with ORDER BY
- you can add an ORDER BY clause to SELECT statement to get the results
sorted in ascending or descending order
SELECT * FROM Users ORDER BY email
SELECT * FROM Users ORDER BY name