Create a Table from Another table :-

Download Script  from Here
Abstract:

  In this artical we will learn how to create table from another table without creating another table.


Agenda:

1)Create a Table from Another table .
2)Inserting Row from one table  to Another Table.
3)Modify the Data in  Table.
4)Update rows of table in GUI.
5)Computed Columns.


Lets Learn in details,

Create a Table from Another table :-


           To create copy of existing table use the following syntax


select */<Columnn List> into  <New Table Name> From <Old Table Name>


eg.
folowing  table create the copy of the table student form with the name stud


select * into tbl_copy from student


insert table with only specefic columns  or Conditions.


select  *  into tbl_Copy1 from tbl_Emp where FName='abhijit'


while creating a table from another table if you dont


to copy the data then specify a condition on the where clause which will be false


select * into student2 from Student where 1=0


Note
      While creating  a table from another table constraints and  indexes available on existing table will not be copy to new table


------------------------------------------------------------
Inserting Row from one table  to Another Table:-
        
You can insert rows from one tables to another provided those tables have columns with same datatype and for this use the following syntax of insert statement.


insert into <Table Name> <Select Statment>


eg:
insert tbl_Copy(StudentId,FirstName ,LastName )select StudentId,FirstName,LastName from Student


Modify the Data in  Table:-
        
To modify the existing data in that table ,you  have to use update command  that has the following  syntax.


Update <tableName> set <ColName>=<Value>,<ColName>=<Value>.......[Where <Condition>]


Eg:
The following examples update th first name of student id 1 to the ‘suhas’


update Student  set FirstName='Suhas' where StudentId =1


Update rows of table in GUI:


  Open the table by right click on the table in object explorer and choosing “Edit 200 Rows” this will open the table and display all exisiting row in the table.
 Whatever value you want modify ,click on that value modify the value and move to the previous or next to complete the update.


Computed Columns:-


  Computed columns are columns for which rows is automatically computed during insert.


  To create a columns as computed columns ,while creating that table after the columnname use the keyword as   followed by the formula based on which the value has to be computed for that columns.
   For the computed columns ,you cannot specify the datatype while insert   the rows into the table containg computed columns ,you must exclude the computed columns and you can not provide values for computed columns manual.

Eg:


   Following example create table with the name marks crating  the columns total,avg,and grade as computed columns.

create table mark(sid int ,c int,cpp int,sql int,total as c+cpp+sql,aveg as (c+cpp+sql)/3.0,
grade as case
when (c+cpp+sql)/3.0 >=70 then 'First Class'
when (c+cpp+sql)/3.0 >=55 then 'SecondClass'
when (c+cpp+sql)/3.0 >=35 then 'Thired Class'
else
'fail'
End)


Insert values using the following syntax:


insert  mark (sid ,c,cpp,sql)values(1001,25,63,45)


check the data after inserted


select * from mark



  If you want to learn more Details  on MSBI then read my next article,


 If you have any query  then frankly  leave mail me dotnetbyabhipatil@gmail.com


For more article  visit my blog
http://dotnetbyabhipatil.blogspot.in



          
Previous
Next Post »

83 comments

Click here for comments
Anonymous
admin
24 March 2015 at 23:22 ×

hi,this is the wonderful information..i have to learning for lot information...hadoop training in chennai

Reply
avatar
Anonymous
admin
24 March 2015 at 23:24 ×

hi, i have being read that your sites i have very like for your wonderfyl information..oracle training in chennai&
oracle training in chennai

Reply
avatar
Anonymous
admin
2 April 2015 at 04:39 ×

My perception is quite interesting. I have been a long traveller in all sequence.

Java training in Chennai | Android training in chennai | IOS training in chennai

Reply
avatar
Unknown
admin
15 April 2015 at 01:01 ×

Extraordinary business side hobby oracle training in chennai will work even it unassuming oracle dba training in chennai part But is that so standard or wide to be see. Visit Us,hadoop training in chennai

Reply
avatar
Anonymous
admin
24 June 2015 at 02:28 ×

Thanks for giving great information about creating table from other table.

Regards,

SAP Training Institute in Chennai


iOS Training in Chennai


Informatica Training in Chennai


SEO Training in Chennai

Reply
avatar
nancy agnes
admin
30 September 2015 at 02:59 ×

Really enjoying your post, you have a great teaching style and make these new concepts much easier to understand. Thanks.

Cloud Computing Training in Chennai | ios Training in Chennai

Reply
avatar
Unknown
admin
11 October 2015 at 03:45 ×

Is it possible to create another table as CREATE TABLE AS and also preserve columns' comments ?
Salesforce Training in Chennai

Reply
avatar
Anonymous
admin
8 February 2016 at 04:27 ×

This is an Very useful information,we offer high quality training fro informatica, informatica

Reply
avatar
Anonymous
admin
12 February 2016 at 05:55 ×

Thank you for taking the time to provide us with your valuable information. We strive to provide our candidates with excellent care and we take your comments to heart.As always, we appreciate your confidence and trust in us.
... iOS Training in chennai

Reply
avatar
Anonymous
admin
16 February 2016 at 03:04 ×

Thank you for having taken your time to provide us with your valuable information relating to your stay with us.we are sincerely concerned.., Most importantly, you Keepit the major...
android training in Chennai

Reply
avatar
Anonymous
admin
16 February 2016 at 21:20 ×

Thank you for the nice article about creating the table in a table.

SAP Training in Chennai

Reply
avatar
17 February 2016 at 02:32 ×

Thanks for sharing this information, it helped me a lot in finding valuable resources for my career
cloud computing training in Chennai

Reply
avatar
Haritha
admin
18 February 2016 at 23:01 ×

Your blog is really good. I gained more knowledge by reading your blog. This is very helpful for me to understand the concepts in the right way.
Hadoop Course in Chennai

Reply
avatar
Haritha
admin
18 February 2016 at 23:08 ×

The blog you have shared with us is really helpful for me to obtain your career development in a right way. Thanks for taking time to provide us a useful information with us.
Hadoop Training in Chennai

Reply
avatar
Jenilia
admin
24 February 2016 at 03:54 ×

Thanks for sharing this unique information with us. Nice to see your blog. Keep on posting
Loadrunner Training in Chennai

Reply
avatar
raphael
admin
25 February 2016 at 00:00 ×

Thank you for sharing such a useful thing like creating the table from the another table.

SEO training Chennai

Reply
avatar
jayashree
admin
25 February 2016 at 01:18 ×

I got useful information and and thanks for sharing.

Reply
avatar
ravi
admin
25 February 2016 at 01:43 ×

It is good.I like to read in this blog.Thanks for giving this valuable one.Our java training is used to develop the real time projects.
Java Training in Chennai

Reply
avatar
27 February 2016 at 04:11 ×

I really like your post. Thanks for posting this useful information

Reply
avatar
Anonymous
admin
1 March 2016 at 04:21 ×

Thank you for explaining the query of creating one table from another table.Informatica Training in Chennai

Reply
avatar
Hema
admin
1 March 2016 at 23:20 ×

Your information is very useful.I have gained some knowledge about it ..Thanks for sharing.
Android Training in Chennai

Reply
avatar
jayashrii
admin
2 March 2016 at 00:54 ×

i got this information which is useful and informative and also i learned how to create table from another table.
sharepoint-developer-training in chennai

Reply
avatar
swarupa
admin
2 March 2016 at 02:53 ×

It is very useful article.I got the new idea for this.Thanks for this.
Sharepoint admin training in chennai

Reply
avatar
Unknown
admin
2 March 2016 at 21:55 ×

wowwww... great blog.. i dont have idea about creating one table from another table.. Good and understandable explanation...Thanks for this blog..VMWare Training in Chennai

Reply
avatar
rekhila
admin
3 March 2016 at 21:41 ×

Your blog is awesome.Its more informative.
Linux training in chennai

Reply
avatar
kala
admin
4 March 2016 at 00:34 ×

thanks for sharing this nice article,it was useful to teach others and improve our knowledge.

CCNA Training in Chennai

Reply
avatar
Unknown
admin
4 March 2016 at 01:56 ×

using one table you can also create another table. this is a very great technical method that provides multiple data storage. thank you for this blog.

CCNA Training in Chennai

Reply
avatar
4 March 2016 at 04:01 ×

It is really awesome and thanks for sharing those tips , which is informative.


websphere training in chennai

Reply
avatar
rekhila
admin
5 March 2016 at 00:38 ×

Thank you for explaining about creating table from another table.Its more informative..
weblogic training in chennai

Reply
avatar
sathya
admin
6 March 2016 at 21:17 ×

the blog is very useful and informative. the blog is about to create a table from another table is very helpful. please keep on updating the blog... thank you.
Microstrategy Training in Chennai

Reply
avatar
Unknown
admin
7 March 2016 at 00:47 ×

nice concepts include in your article how to set a table with another table. thanks for clearly explained step by step format of how can evaluate without using manual method.
keep update.
Datawarehousing Training in Chennai

Reply
avatar
Unknown
admin
17 March 2016 at 04:04 ×

awesome explaination on creation of table...Java Training in chennai

Reply
avatar
Unknown
admin
28 March 2016 at 03:59 ×



These provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post. Your articles really impressed for me,because of all information so nice.

Peridot Systems Adyar Chennai Reviews

Reply
avatar
Unknown
admin
28 March 2016 at 04:16 ×


These provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post. Your articles really impressed for me,because of all information so nice.

Peridot Systems Adyar Chennai Reviews

Reply
avatar
Unknown
admin
28 March 2016 at 04:32 ×


These provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post. Your articles really impressed for me,because of all information so nice.

Peridot Systems Adyar Chennai Reviews

Reply
avatar
Ridhima
admin
2 April 2016 at 06:58 ×

Thanks for the good words! Really appreciated. Great post. I’ve been commenting a lot on a few blogs recently, but I hadn’t thought about my approach until you brought it up.

SEO training in Adyar

Reply
avatar
Unknown
admin
22 April 2016 at 04:11 ×

in this sit e Multi-level ivr plugin Rank Sol WP IVR The WordPress Multi Level IVR Plugin comes with complete IVR solution to fulfill all your personal or commercial needs.

Reply
avatar
Nicky Paul
admin
25 April 2016 at 04:29 ×

Phone calls can be composed so that the calling party calls alternate members and adds them to the call; be that as it may, members are generally ready to call into the telephone call themselves by dialing a phone number that interfaces with a "meeting extension" (a specific sort of hardware that connections phone lines).
Conference Calling Plugins

Reply
avatar
Anonymous
admin
19 May 2016 at 00:33 ×

nice to see blog..
Best SEO training in hyderabad all modules are clearly solved and practice with guide.seo training in hyderabadAnd clearly getting knowledge of seo.

Reply
avatar
Unknown
admin
27 May 2016 at 23:49 ×


This is my first time visit on your site and i have bookmark this for again visit. thanks a lot of for share a appreciable post ..
salesforce training in hyderabad

Reply
avatar
Unknown
admin
27 June 2016 at 23:21 ×

thanks for sharing ..

Informatica training, in the recent times has acquired a wide scope of popularity amongst the youngsters at the forefront of their career.
Informatica online training in hyderabad

Reply
avatar
Unknown
admin
4 July 2016 at 00:31 ×

Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
salesforce training in hyderabad

Reply
avatar
Anonymous
admin
9 July 2016 at 03:31 ×

Thanku for sharing this nice posts..

sap fiori training in hyderabad

Reply
avatar
Anonymous
admin
9 July 2016 at 05:47 ×

Thanku for sharing table posts to another table..

SAP Hana online training in hyderabad


Reply
avatar
Aashi siva
admin
17 July 2016 at 23:56 ×

I do believe all of the concepts you’ve introduced in your post. They’re very convincing and will definitely work. Nonetheless, the posts are too short for novices. May you please extend them a bit from subsequent time? Thank you for the post.

Online Training in Chennai

Reply
avatar
Anonymous
admin
3 August 2016 at 05:20 ×

create table nice posts..


sap fiori training in hyderabad


Reply
avatar
Anonymous
admin
3 August 2016 at 05:27 ×

crating table nice posts..Thanku for sharing this ncioe posts..

SAP Hana training in hyderabad




Reply
avatar
Keerthi
admin
9 August 2016 at 05:06 ×

You made some decent factors there. I looked on the internet for the difficulty and found most individuals will associate with along with your website.Keep update more excellent posts.

Online Training in Chennai

Reply
avatar
Unknown
admin
12 August 2016 at 22:42 ×

create table from another table nice posts..

Hadoop training in hyderabad.All the basic and get the full knowledge of hadoop.
hadoop training in hyderabad

Reply
avatar
Anonymous
admin
26 August 2016 at 01:38 ×

create table from another table nic eposts..
informatica online training


Reply
avatar
Anonymous
admin
23 October 2016 at 02:44 ×

Valuable link...Amazing psot.. with all details SAP Training in Chennai

Reply
avatar
Unknown
admin
3 November 2016 at 04:27 ×

Thank you for sharing your useful information.

android training in chennai

Reply
avatar
Unknown
admin
22 March 2017 at 04:23 ×

Thank you for sharing the information here. Its much informative and really i got some valid information. You had posted the amazing article.

Painless Dental Treatment In Chennai

Best Dental Clinic In Adyar

Reply
avatar
sathya
admin
28 March 2017 at 23:26 ×

It is really a great and useful piece of info. I’m glad that you shared this helpful info with us. Please keep us informed like this. Thank you for sharing.

Hadoop Training in Chennai

Base SAS Training in Chennai

Reply
avatar
18 April 2017 at 08:41 ×

Thanks for sharing useful information article to us keep sharing this info,
Hi we at Colan Infotech Private Limited , a company which is Situated in US and India, will provide you best java web service and our talented
java application development.
team will assure you best result and we are familiar with international markets, We work with customers in a wide variety of sectors. Our talented team can handle all the aspects of
Java web application development,
we are the best among the
Java development company.
We have quite an extensive experience working with
java development services.
we are the only Java application development company.
which offer custom services to a wide range of industries by exceeding our client’s expectations. You can even interact directly with the team regarding your project, just as you would with your in-house team.Our pro team will provide you the best
java appliaction development services.
We are best among the
java development companies in Chennai,
please review our customer feedbacks so that you may find a clue about us. If you want one stop solution for java development outsourcing, Colan infotech is the only stop you need to step in. Colan Infotech is the unique
java web development company.
were our team of unique
java application developer
were ranked top in
java enterprise application development.

Reply
avatar
Unknown
admin
21 August 2017 at 02:41 ×

Interesting blog post.This blog shows that you have a great future as a content writer.waiting for more updates...

Digital Marketing Company in India

Digital Marketing Services in India

Digital Marketing Agency in India

Digital Marketing Companies in India

Reply
avatar
Aruna Ram
admin
12 December 2018 at 21:30 ×

Thank you so much for your wonderful concept and truly well post. I appreciative to your sharing and i want more updates from your blog.
Tableau Certification in Bangalore
Tableau Training Institutes in Bangalore
Tableau Training in Bangalore
Tableau Course in Bangalore
Tableau Coaching in Bangalore

Reply
avatar
SANDY
admin
19 January 2019 at 02:56 ×


Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.
AWS Training in Bangalore with Placements | AWS Training in Bangalore Cost
AWS Training in Pune With Placement | AWS Devops Training in Pune
AWS Online Training | AWS Online Training Cost
AWS Training in Bangalore cost| Aws training in Bangalore Besant Technologies

Reply
avatar
Unknown
admin
28 May 2019 at 03:48 ×

I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
Azure Training in Chennai

Reply
avatar
Devi
admin
21 June 2021 at 09:02 ×

Learn Amazon Web Services for excellent job opportunities from Infycle Technologies, the best AWS training center in Chennai. Infycle Technologies gives the most trustworthy AWS course in Chennai, with full hands-on practical training from professional trainers in the field. Along with that, the placement interviews will be arranged for the candidates, so that, they can meet the job interviews without missing them. To transform your career to the next level, call 7502633633 to Infycle Technologies and grab a free demo to know more
Top AWS Course in Chennai | Infycle Technologies

Reply
avatar
Aaina
admin
26 May 2022 at 22:38 ×

Thank you for sharing this useful information, I will regularly follow your blog.

BA 3rd Year Result

Reply
avatar