This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

How to Add data in SQL Table



How to Add data in SQL Table


In this post How to Add data in SQL Table, we will discuss about inserting rows in sql tables. This is a very common question How to Add data in SQL Table . Adding data means inserting rows in sql tables. Before we insert data into tables , We first have to create tables in sql database
How to Add data in SQL Tables
How to Add data in SQL Table

If the tables are already created, then before you enter data into a SQL  database table, you have to know the name of the table as well as the various columns of the table. Along with names of the columns, we you have to be familiar with the data types of the various columns of the table.

Is this possible to know the name and data types of various columns of the table, yes this is quite simple to know the name of the columns and their data types. This can be done by using desc table command

Desc Table Command


The Desc Table command of SQL is to describe the structure of the table.
For example if we supply command like this : Desc employee;

This will display the whole structure of the employee table. It will display the name of the columns along with column specifications.

When you came to know the names of various columns and their data types, their widths and constraints, we can add rows to the table.

While inserting rows into tables, you have to take care with number of columns and their data types.

How to Add data in SQL Table

To  add a row in a table in sql, we have to use insert into command. The use of insert into command is quite simple.

Insert into Command


The insert into command is helpful for our query “How to Add data in SQL Table “ . With the help of insert into command, we can add rows in a table.

The General Syntax of Insert into Command 

Insert into <table name> values (value1, value 2,…);


How to Add data in SQL Tables
How to Add data in SQL Table


Here table name is the name of the table in which you wants to add rows.
Suppose the name of the table is employee, the insert statement will be like this;

Insert into employee values (101, ‘SAM’);

After execution of the statement, the following message will be displayed
I row(s) created.

Here, you have to be care full, 101 will be added to first column of the table and SAM will be added to the second column of the table.

It is necessary to take care of data types of while inserting rows in a table.                   
With one insert into command, you can add only one row in a table. For Multiple rows , we have to use insert into command multiple times.

Few more examples of Insert into Command.

Given a table named employee with columns ecode->char(4), ename->varchar2(30), ecity->varchar2(30)

  Employee Table
Ecode
Ename
Ecity













Insert into employee values (‘E001’,’SAM’,’Florida’);

Here the first value E001 will be stored in first column of the table, second value SAM will be stored in second column of the table and third value Florida will be stored in  the third column of the table. In this case, user must be aware about the sequence of the columns of employee table. If by mistake he supply insert into command as Insert into employee values (‘SAM’,’E001’,’Florida’);

In this case employee name will be stored in employee code column and employee code will be stored in employee name column.

To avoid such problems, supply insert into like this:

Insert into employee(ecode, ename, ecity ) values (‘E001’,’SAM’,’Florida’);
This will add a row in database table, in this case E001 will be stored in ecode, SAM will be stored in ename and Florida will be stored in ecity column of the employee table.
Main thing here is , you donot have to remember the sequence of columns in the table. You can supply the above insert into command as : Insert into employee(ename, ecode, ecity ) values (‘SAM’,’E001’,’Florida’);

Here you can see, we had altered the sequence of values, we had written SAM as first value and E001 as second value, we had also altered the sequence of column names in the above statement, ename is given first and then ecode.

How to insert multiple rows in SQL Table


To insert multiple rows in a table,  we have to supply insert into command as
Insert into employee values (&eocde, &ename,&ecity);
When you supply this command, the following output will be generate.
Enter Value for Ecode :
Here you have to supply value for ecode like ‘E001’
After this you will get –
Enter Value for Ename :
Here you have to supply value for ename like ‘SAM’
After this you will get –
Enter Value for Ecity :
Here you have to supply value for ecity like ‘Florida’
After this following message will be generated –
1 row(s) created.
After this sql prompt will come.
Sql>
Here you have to write run
Sql>run;
Run command of sql executes the last executable statement stored in Sql buffer. In this case it is : Insert into employee values (&eocde, &ename,&ecity);
Again you have to supply new values, you can repeat this step for as many times as you want.

How to add data in SQL Table

The answer to this question How to add data in SQL Table is the use of insert into Command. To add data in sql table, first thing is to know the name of the table, column names of the table and data types and constraints of columns of table. Inserting rows , inserting data, add data and add rows are interchangeable terms.

Summary

We hope this post How to Add data in SQL Table is informative and helpful to you. If you wish you can ask any question regarding this post. We will appreciate social media share of this post by you.

Related Searches

insert data from one table to another ,
insert into access    ,
insert into db2        ,
insert into from another table    ,
insert into multiple rows  ,
insert into multiple values           ,
insert into mysql     ,
insert into oracle    ,
insert into select     ,
insert into select from       ,
insert into select mysql     ,
insert into select oracle    ,
insert into select sql           ,
insert into select sql server          ,
insert into select效能       ,
insert into set          ,
insert into sql from another table         ,
insert into sql server          ,
insert into sql server 2008           ,
insert into temp table       ,
insert into values    ,
insert into多筆       ,
insert into多筆資料         ,
insert into的相關搜尋    ,
insert into語法       ,
insert multiple rows sql    ,
mssql insert into     ,
mssql insert into select     ,
oracle insert into    ,






how to add row a rowinsql

How to Add a Row in SQL


In this post how to add a row in SQL, we will discuss about inserting rows in sql tables. This is a very common question how to add a row in SQLBefore we insert data into tables , We first have to create tables in sql database. If the tables are already created, then before you enter data into a SQL  database table, you have to know the name of the table as well as the various columns of the table. Along with names of the columns, we you have to be familiar with the data types of the various columns of the table. 

How to know the name of the various columns and their respective data types?

Is this possible to know the name and data types of various columns of the table, yes this is quite simple to know the name of the columns and their data types. This can be done by using desc table command

Desc Table Command

The Desc Table command of SQL is to describe the structure of the table.

For example if we supply command like this : Desc employee;

This will display the whole structure of the employee table. It will display the name of the columns along with column specifications.

When you came to know the names of various columns and their data types, their widths and constraints, we can add rows to the table.

While inserting rows into tables, you have to take care with number of columns and their data types.

To  add a row in a table in sql, we have to use insert into command. The use of insert into command is quite simple.

Insert into Command


The insert into command is helpful for our query “ how to add a row in sql “ . With the help of insert into command, we can add rows in a table.

The General Syntax of Insert into Command 

Insert into <table name> values (value1, value 2,…);


Here table name is the name of the table in which you wants to add rows.

Suppose the name of the table is employee, the insert statement will be like this;
Insert into employee values (101, ‘SAM’);

After execution of the statement, the following message will be displayed
I row(s) created.

Here, you have to be care full, 101 will be added to first column of the table and SAM will be added to the second column of the table.

It is necessary to take care of data types of while inserting rows in a table.                   
With one insert into command, you can add only one row in a table. 

For Multiple rows , we have to use insert into command multiple times.

Few more examples of Insert into Command


Given a table named employee with columns ecode->char(4), ename->varchar2(30), ecity->varchar2(30)

Insert into employee values (‘E001’,’SAM’,’Florida’);


Here the first value E001 will be stored in first column of the table, second value SAM will be stored in second column of the table and third value Florida will be stored in  the third column of the table. 

In this case, user must be aware about the sequence of the columns of employee table. If by mistake he supply insert into command as Insert into employee values (‘SAM’,’E001’,’Florida’);

In this case employee name will be stored in employee code column and employee code will be stored in employee name column.

To avoid such problems, supply insert into like this:
Insert into employee(ecode, ename, ecity ) values (‘E001’,’SAM’,’Florida’);

This will add a row in database table, in this case E001 will be stored in ecode, SAM will be stored in ename and Florida will be stored in ecity column of the employee table.

Main thing here is , you donot have to remember the sequence of columns in the table. You can supply the above insert into command as : Insert into employee(ename, ecode, ecity ) values (‘SAM’,’E001’,’Florida’);

Here you can see, we had altered the sequence of values, we had written SAM as first value and E001 as second value, we had also altered the sequence of column names in the above statement, ename is given first and then ecode.


How to insert multiple rows in SQL Table


To insert multiple rows in a table,  we have to supply insert into command as

Insert into employee values (&eocde, &ename,&ecity);
When you supply this command, the following output will be generate.
Enter Value for Ecode :
Here you have to supply value for ecode like ‘E001’
After this you will get –
Enter Value for Ename :
Here you have to supply value for ename like ‘SAM’
After this you will get –
Enter Value for Ecity :
Here you have to supply value for ecity like ‘Florida’
After this following message will be generated –
1 row(s) created.
After this sql prompt will come.
Sql>
Here you have to write run
Sql>run;

Run command of sql executes the last executable statement stored in Sql buffer. In this case it is : Insert into employee values (&eocde, &ename,&ecity);
Again you have to supply new values, you can repeat this step for as many times as you want.

How to add data in SQL Table

The answer to this question How to add data in SQL Table is the use of insert into Command. To add data in sql table, first thing is to know the name of the table, column names of the table and data types and constraints of columns of table. Inserting rows , inserting data, add data and add rows are interchangeable terms.

Related Searches

insert into access    ,
insert into db2        ,
insert into from another table    ,
insert into multiple rows  ,
insert into multiple values           ,
insert into oracle    ,
insert into set          ,
insert into sql from another table         ,
insert into sql server          ,
insert into sql server 2008           ,
insert into temp table       ,
insert into values    ,
insert into多筆       ,
insert into多筆資料         ,
insert into的相關搜尋    ,
insert into語法       ,
insert multiple rows sql    ,






Summary


This was all about how to add a row in SQL , we hope this post how to add a row in SQL is helpful for the viewers of this post. You can share this post on your social media ids( Facebook, Twitter , linkedin  ) . This will encourage us to write more content like this.

java do while loop example code

JAVA Do While Loop Example Code


In this post we will discuss Java Do While loop. A Java Do While Loop is similar as it is in C or C++ Language. A Java do while loop is some how different from for loop and while loop. The specialty of do while  loop is that , its body gets at least once, even the loop condition is false.

JAVA Do While Loop example



Before we go into details of a do while loop, let us discuss what are loops and why loops are needed in any programming language. The answer to this question is , sometimes in programming we need to repeat a set of statements for a number of times. Writing same code again and again in the same program is difficult for a programmer. Also it increases program length. Suppose in a program , there is need of writing a string "Hello " 100 times. Then we have to write print statement 100 times. Writing print statement 100 times in a single program for the same output is difficult. In that case we can use a loop of 100, and in that case we have to use only a single loop statement.

Print ("hello");

Print ("hello");

-

-

Print ("hello");

The alternative way is use of a for loop.

for (i=1;i<=100;i++)

{

print("Hello");

}

You can see the difference.


Do While Loop

A Java Do while loop executes a set of of Java statements as long as the loop condition evaluates to true.

In some programming conditions ,we require a loop that executes at least once before evaluating Boolean condition.

Java Do while loop is Exit Controlled Loop

General Syntax of Java do while loop


The general syntax of a Java do while loop  is:
do
{
set of statements to be repeated;
} while(condition);
Example:

class Test 
{
   public static void main(String args[]){
      int i = 1;

      do{
         System.out.print("value of i : " + i );
         i++;
         System.out.print("\n");
      }while( i < 11 );
   }
}

Usually it is recommended to avoid the use of do-while loop. For loop and while loop are more convenient loops in Java.

Summary

 This was all about do while loop in Java.


First Modern Olympic Games

First Modern Olympic Games


In this post First Modern Olympic Games , we will read about the time and events when First Modern Olympic Games started. It was on 6th April ,1896 Olympic games reborn. Earlier they were banned by Roman Emperor Theodosius. The games were restarted after a time gap of 1500 years.


There were  280 athletes from 13 nations. They participated in 43 events, these events were track-and-field, gymnastics,swimming,  cycling,  weightlifting,wrestling, fencing, shooting, and tennis.


In this event all the competitors were male.

Shooting-John and Sumner Paine (USA)


John and Sumner Paine were the representatives of the USA in Athenes for  shooting events. John Paine were Harvard graduated set off for Athens via France.



Cycling (track) -Paul Masson (FRE)


Paul Masson was 21-year-old.He was a  Frenchman . He  arrived in there without any international pedigree.



Swimming-Alfréd Hajos (HUN)


Alfréd Hajos was a Hungarian architecture student. He was the star of the swimming events of 1896 Olympic games .



Tennis-John Pius Boland (IRL)


He was born at Dublin. John Pius Boland attended two private  schools, one English , the second one Irish.

Thomas Burke (USA) - 100m


Thomas Edward Burke won two time Olympic gold medals.

Spyridon Louis (GRE) - Marathon


Spyridon Louis was born on 12 January , 1873, at Marousi , Greece.