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
 General SQL Server Forums
 New to SQL Server Programming
 Language for stored procedures?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Rock_query
Yak Posting Veteran

52 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

547 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
52309 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  
 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.05 seconds. Powered By: Snitz Forums 2000