Walk Lightly on this PLANET and yet leave such a FOOTPRINT that cannot be erased for thousands of Years..!!!
Visit Codstech for Cyber Security related Posts !

Visitors

Thursday, April 11, 2013

4 : Starting SQL Commands

Refer  SQL-create Database & Table and create a Database named "Studysql" and a table named "tbl_biodata"

ID
NAME
AGE
CITY
PHONE
1
Priyada
25
Cochin
1000000001
2
Mohan
30
Cochin
2000000002
3
Jaimon Jacob
40
Vytila
3000000003
4
Sumith
24
Kottayam
4000000004
5
Shaiju
36
Thrissur
5000000005

The created Table and Database in SQL is :





Next step is , right click on the id field , and select Set Primary Key option , so that the id field can't repeat  ( see a key symbol  is appeared near to the id field).
Also from the column properties, set identity sepcification as YES  (So that it will increment by one by entering each field).
See the figure below :



And , save the table (tbl_biodata) , then write clock on the table name and select OPEN TABLE from the drop down menu.
(Note that , a star (*) can see on the table name , and it indicate that the table is not saved. See the below picture, and we can see that the star is not there , which shows that the table , tbl_biodata ,  is saved).

Then start entering details .







After entering values , the table :


How to type SQL-Query ?

Select the created Database "Studysql" and right click to select "New Query" .
Then a code window will appear  , and we can write Queries there.

How to Execute SQL-Query ?


Select the menu Query Designer and then click on the option Execute Query . You can  use CTRL + R also .

Or , See the  symbol for executing Query as given below :




Now , we are going to apply SQL Commands in this table, from next chapter onwards.


No comments: