sapna

an anonymous user · December 06, 2021 · SQL
-- create a table
CREATE TABLE Customers(
  CustomerID INTEGER PRIMARY KEY,
  CustomerName TEXT NOT NULL,
  ContactName TEXT NOT NULL,
  Address TEXT NOT NULL,
  City TEXT NOT NULL,
  PostalCode TEXT NOT NULL,
  Country TEXT NOT NULL,
);
-- insert some values
INSERT INTO Customers VALUES (1, 'Alfreds Futterkiste','Maria Anders',	'Obere Str. 57','Berlin',12209,'Germany');
INSERT INTO Customers VALUES (2, 'Ana Trujillo Emparedados y helados','Ana Trujillo',	'Avda. de la Constitución 2222','México D.F.',05021,'Mexico');
INSERT INTO Customers VALUES (3, 'Antonio Moreno Taquería','Antonio Moreno',	'Mataderos 2312','México D.F.',05023,'Mexico');
INSERT INTO Customers VALUES (4, 'Around the Horn','Thomas Hardy',	'120 Hanover Sq.','London',WA1 1DP,'UK');
INSERT INTO Customers VALUES (5, 'Berglunds snabbköp','	Christina Berglund','Berguvsvägen 8','Luleå',S-958 22,'Sweden');

-- fetch some values
SELECT * FROM Customers 

Comments

Please sign up or log in to contribute to the discussion.