Normally for designing any software the first two things are required are database to store the data and a frontend software to put the data inside the database and to generate reports.
Given below are some useful statements which help you to design an table to put the data into it and to manipulate the data with sql statements.
To create a database with SQL Statement we use the following statement :
Create Table_Name (field1 data_type1, field2 data_type2,....)
Example :
Create AddressBook (Name varchar(30), Address1 varchar(50), Address2 varchar(30), TelNo varchar(10))
Creates a table AddressBook in the current location having fields Name, Address1, Address2 and TelNo.
Once the table is designed the next step is to put the data inside the table which can be done with the following statment :
Insert into Table_name values ("value1", "value2",....)
Example :
Insert into AddressBook values ("A.Symonds", "Gr.Floor, ABC Apartments", "XYZ Road, Area XMS", "5879879870")
The above statement puts the values inside the inverted commas inside the table AddressBook.
Note : the inverted commas are used for the string type of data. For numeric type of data we do not put the
inverted commas.
To do the further updations in the data inside the tables we have to use the following statements:
Update TableName
Set Field4 = Value2
Example :
Update Addressbook
Set TelNo = "7878787898"
The above statement will change the value of the telephone No. inside the table Addressbook to the new values "7878787898"
|
|
|
|
|
|