Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

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

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Language for stored procedures?
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Rock_query
Yak Posting Veteran

55 Posts

Posted - 04/21/2013 :  22:51:11  Show Profile  Reply with Quote
When you use IF statements, Loops and declare variables in SQL are you using stored procedures?

When you use loops, variables, etc. what programming language do you use? Are you still using SQL or are you actually using a particular programming language such as C#?

MuMu88
Aged Yak Warrior

549 Posts

Posted - 04/21/2013 :  23:01:13  Show Profile  Reply with Quote
T-SQL

If are interested you can find more about it at: http://en.wikipedia.org/wiki/Transact-SQL
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52326 Posts

Posted - 04/22/2013 :  00:48:26  Show Profile  Reply with Quote
you can use loops variable etc inside a procedure or you can even write it as a batch query. But stored procedures have advantage of caching and reusing the plans (unless using WITH RECOMPILE) hence thats the recommended way.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next 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.05 seconds. Powered By: Snitz Forums 2000