SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Insert
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

abhijaiswal.84
Starting Member

India
29 Posts

Posted - 05/30/2012 :  02:37:09  Show Profile  Reply with Quote
Hi,

Can anyone help me to findout the answer for,

How to enter 10 records in table in single statement without referring another table.

Ex : Consider a table with column salary and insert 10 different salaries in the table.

Thanks in advance.


Abhishek

visakh16
Very Important crosS Applying yaK Herder

India
47173 Posts

Posted - 05/30/2012 :  16:25:00  Show Profile  Reply with Quote
where will you get 10 different salaries from? do you've variables to store them or they come from parameters?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22461 Posts

Posted - 06/04/2012 :  09:25:45  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
insert into table(sal)
values ((8724),(876287),(8876),....)

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
47173 Posts

Posted - 06/04/2012 :  10:24:48  Show Profile  Reply with Quote
see other uses of VALUES clause in 2008 here

http://visakhm.blogspot.com/2012/05/multifacet-values-clause.html?m=0

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22461 Posts

Posted - 06/05/2012 :  05:19:20  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
You may alos need to read this
http://beyondrelational.com/modules/2/blogs/70/posts/10905/interesting-enhancements-to-the-values-clause-in-sql-server-2008.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000