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 :-
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
83 comments
Click here for commentshi,this is the wonderful information..i have to learning for lot information...hadoop training in chennai
Replyhi, i have being read that your sites i have very like for your wonderfyl information..oracle training in chennai&
Replyoracle training in chennai
Informatica training in Chennai
ReplyIs that would be possible to use c+cpp+sql to find overall average.
Big data training in Chennai | Android training in chennai
hi all, i would like to share ..
ReplySap training in chennai
| Sucess factor training in chennai
My perception is quite interesting. I have been a long traveller in all sequence.
ReplyJava training in Chennai | Android training in chennai | IOS training in chennai
SAP Training Visit Us,
ReplySap training in chennai | SAP Success factor training in chennai | Workday training in chennai | Success factor training in chennai
SAP Training Visit Us,
ReplySap training in chennai | SAP Success factor training in chennai | Workday training in chennai | Success factor training in chennai
Catch you up soon.
ReplyJava training in Chennai | Android training in chennai | Java training in Chennai
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
ReplyVery Informative blog thanks...
SAP BASIS Training in Chennai
SAP B1 Training in Chennai
SAP BI Training in Chennai
SAP Dynpro Training in Chennai
SAP ABAP Training in Chennai
SAP Training in Chennai
SAP Training Institute in Chennai
Thanks for giving great information about creating table from other table.
ReplyRegards,
SAP Training Institute in Chennai
iOS Training in Chennai
Informatica Training in Chennai
SEO Training in Chennai
Hi, This is the useful information.
ReplyHadoop Training in Chennai
Really enjoying your post, you have a great teaching style and make these new concepts much easier to understand. Thanks.
ReplyCloud Computing Training in Chennai | ios Training in Chennai
Is it possible to create another table as CREATE TABLE AS and also preserve columns' comments ?
ReplySalesforce Training in Chennai
great post
ReplyThis is an Very useful information,we offer high quality training fro informatica, informatica
ReplyThank 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.
Reply... iOS Training in chennai
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...
Replyandroid training in Chennai
Thank you for the nice article about creating the table in a table.
ReplySAP Training in Chennai
Thanks for sharing this information, it helped me a lot in finding valuable resources for my career
Replycloud computing training in Chennai
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.
ReplyHadoop Course in Chennai
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.
ReplyHadoop Training in Chennai
Thanks for sharing this unique information with us. Nice to see your blog. Keep on posting
ReplyLoadrunner Training in Chennai
Thank you for sharing such a useful thing like creating the table from the another table.
ReplySEO training Chennai
I got useful information and and thanks for sharing.
ReplyIt 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.
ReplyJava Training in Chennai
Nice blog. Join our VMWare Training in Chennai
ReplyI really like your post. Thanks for posting this useful information
ReplyThank you for explaining the query of creating one table from another table.Informatica Training in Chennai
ReplyYour information is very useful.I have gained some knowledge about it ..Thanks for sharing.
ReplyAndroid Training in Chennai
i got this information which is useful and informative and also i learned how to create table from another table.
Replysharepoint-developer-training in chennai
It is very useful article.I got the new idea for this.Thanks for this.
ReplySharepoint admin training in chennai
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
ReplyYour blog is awesome.Its more informative.
ReplyLinux training in chennai
thanks for sharing this nice article,it was useful to teach others and improve our knowledge.
ReplyCCNA Training in Chennai
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.
ReplyCCNA Training in Chennai
It is really awesome and thanks for sharing those tips , which is informative.
Replywebsphere training in chennai
Thank you for explaining about creating table from another table.Its more informative..
Replyweblogic training in chennai
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.
ReplyMicrostrategy Training in Chennai
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.
Replykeep update.
Datawarehousing Training in Chennai
awesome explaination on creation of table...Java Training in chennai
Reply
ReplyThese 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
ReplyThese 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
ReplyThese 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
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.
ReplySEO training in Adyar
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.
ReplyPhone 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).
ReplyConference Calling Plugins
nice to see blog..
ReplyBest SEO training in hyderabad all modules are clearly solved and practice with guide.seo training in hyderabadAnd clearly getting knowledge of seo.
ReplyThis 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
Nice post in .Net..Tableau Training in Chennai
Replythanks for sharing ..
ReplyInformatica 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
Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
Replysalesforce training in hyderabad
Very nice blogs.
ReplyUnix Shell Scripting Training | Angularjs Training | Hadoop Training
Thanku for sharing this nice posts..
Replysap fiori training in hyderabad
Thanku for sharing table posts to another table..
ReplySAP Hana online training in hyderabad
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.
ReplyOnline Training in Chennai
create table nice posts..
Replysap fiori training in hyderabad
crating table nice posts..Thanku for sharing this ncioe posts..
ReplySAP Hana training in hyderabad
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.
ReplyOnline Training in Chennai
create table from another table nice posts..
ReplyHadoop training in hyderabad.All the basic and get the full knowledge of hadoop.
hadoop training in hyderabad
create table from another table nic eposts..
Replyinformatica online training
Valuable link...Amazing psot.. with all details SAP Training in Chennai
Reply
Replyqlikview training in chennai
dot net training in chennai
ReplyThank you for sharing your useful information.
Replyandroid training in chennai
Thank you for sharing the information here. Its much informative and really i got some valid information. You had posted the amazing article.
ReplyPainless Dental Treatment In Chennai
Best Dental Clinic In Adyar
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.
ReplyHadoop Training in Chennai
Base SAS Training in Chennai
Thanks for sharing useful information article to us keep sharing this info,
ReplyHi 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.
Awesome post,Thanks for sharing very informative blog keep sharing ..
ReplyMobile application development company in chennai.
Mobile App Development Company in chennai
Mobile application development in chennai.
mobile app developers in chennai .
Interesting blog post.This blog shows that you have a great future as a content writer.waiting for more updates...
ReplyDigital Marketing Company in India
Digital Marketing Services in India
Digital Marketing Agency in India
Digital Marketing Companies in India
Thanks for sharing this steps. I have learned how to create table.
ReplyBest Informatica Training in Chennai | Informatica course in Chennai | Informatica Training center in Chennai
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.
ReplyTableau Certification in Bangalore
Tableau Training Institutes in Bangalore
Tableau Training in Bangalore
Tableau Course in Bangalore
Tableau Coaching in Bangalore
ReplyHmm, 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
I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
ReplyAzure Training in Chennai
thanks for sharing this information
Replybest python training in chennai
best python training in sholinganallur
best python training institute in omr
python training in omr
selenium training in chennai
selenium training in omr
selenium training in sholinganallur
Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.
ReplySalesforce Training in Chennai
Salesforce Online Training in Chennai
Salesforce Training in Bangalore
Salesforce Training in Hyderabad
Salesforce training in ameerpet
Salesforce Training in Pune
Salesforce Online Training
Salesforce Training
Nice article thanks for sharing guys.
Replyacte reviews
acte velachery reviews
acte tambaram reviews
acte anna nagar reviews
acte porur reviews
acte omr reviews
acte chennai reviews
acte student reviews
awesome blog due and I really Like your work
ReplyFull Stack Training in Chennai
Full Stack Course Chennai
Full Stack Training in Bangalore
Full Stack Course in Bangalore
Full Stack Training in Hyderabad
Full Stack Course in Hyderabad
Full Stack Training
Full Stack Course
Full Stack Online Training
Full Stack Online Course
Thanks for the article. Its very useful. Keep sharing. Azure course online | azure training in chennai | Azure training in chennai, omr
ReplyLearn 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
ReplyTop AWS Course in Chennai | Infycle Technologies
This post is so interactive and informative.keep update more information...
ReplyArtificial Intelligence Course in Tambaram
Artificial Intelligence Course in Chennai
Great post. keep sharing such a worthy information.
ReplyAngularjs Training in Chennai
Angularjs Certification Online
Angularjs Training In Bangalore
Thank you for sharing this useful information, I will regularly follow your blog.
ReplyBA 3rd Year Result
ConversionConversion EmoticonEmoticon