Relation:Modify relations
You can read a CSV file, modify the relation in it and save it again as CSV file. Note however that you are working directly without safenet. Unless querying, modifying cannot be repeated.
Create relations
SQL | Relation |
---|---|
CREATE TABLE Persons ( PersonID int, LastName varchar(255), FirstName varchar(255), Address varchar(255), City varchar(255) ) |
relation PersonID, LastName, FirstName, Adress, City |
CREATE TABLE TestTable AS SELECT customername, contactname FROM customers |
read "customers.csv" |
Add or remove columns
SQL | Relation |
---|---|
ALTER TABLE Customers ADD Email varchar(255) |
read "Customers.csv" |
ALTER TABLE Customers DROP COLUMN Email |
read "Customers.csv" |
Insert
SQL | Relation |
---|---|
INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country) VALUES ('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway') |
read "Customers.csv" |
Update
SQL | Relation |
---|---|
UPDATE Customers SET ContactName = 'Alfred Schmidt', City= 'Frankfurt' WHERE CustomerID = 1 |
read "Customers.csv" |
Delete
SQL | Relation |
---|---|
DELETE FROM Customers WHERE CustomerName='Alfreds Futterkiste'; | read "Customers.csv" |