Database SQL Analyser: Tutorial 4[Back] [SQL Test] [Database] This page shows how SQL commands can be applied to a database for the creation of a table, and adding entries: |
Presentation
SQL Commands used
- CREATE TABLE myTable (id INT IDENTITY(1,1) PRIMARY KEY, surname VARCHAR(50), date_of_birth DATETIME, interest VARCHAR(50), age INT) Try
- INSERT INTO myTable (surname,date_of_birth,interest,age) VALUES ('Allan','6/3/71','Soccer',50) Try
- INSERT INTO myTable (surname,date_of_birth,interest,age) VALUES ('Bert','6/8/65','Tennis',40) Try
- INSERT INTO myTable (surname,date_of_birth,interest,age) VALUES ('Malcolm','6/3/63','Golf',55) Try
- INSERT INTO myTable (surname,date_of_birth,interest,age) VALUES ('McLean','8/3/81','Soccer',60) Try
- SELECT * FROM myTable Try
- DROP TABLE myTable Try