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

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Diff b/w Create & declare

Author  Topic 

kashyap_sql
Posting Yak Master

174 Posts

Posted - 2010-08-03 : 06:45:38
just small clarification

With Regards
Kashyap M

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-08-03 : 07:07:00
You can create objects like tables, stored procedure etc.
You can declare variables.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-08-03 : 09:39:58
Declare is also used to declare a cursor

Madhivanan

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

robvolk
Most Valuable Yak

15732 Posts

Posted - 2010-08-03 : 09:44:02
Objects that are CREATEd will persist/remain unless you explicitly DROP them (temp tables are an exception).

DECLAREd objects will automatically disappear and cannot be explicitly dropped (cursors are an exception).
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2010-08-03 : 09:49:38
and you can declare table variables, sql2k and higher

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

kashyap_sql
Posting Yak Master

174 Posts

Posted - 2010-08-04 : 01:13:33
thanks to all for the clarification

With Regards
Kashyap M
Go to Top of Page
   

- Advertisement -