Web developer roadmap : How to become web developer ? web development kya hai ?
Stored Procedures In Snwflake In Hindi | Snwflake Stored Procedures Example
Back end developer roadmap : how to became back end developer ? back end development kya hai?
Snowflake Virtual warehouses In Hindi | Create warehouse In Snowflake In Hindi
Web Page Kya Hai, Elements of web page in Hindi
Java program to remove duplicate elements from an array
JavaScript Object keys, values, entries : Object methods in JS
JavaScript "new Function" Syntax : JS "new Function" Syntax
PHP Null Coalescing Operator In Hindi , Null Coalescing Operator kya hai ?
If tutorials available on this website are helpful for you, please whitelist this website in your ad blocker😭 or Donate to help us ❤️ pay for the web hosting to keep the website running.
programming language like PHP , Java , C , C++ etc की तरह ही आप Snowflake में भी variables को define कर सकते हैं। और इस topic में आप सीखेंगे कि कैसे Snowflake में variables define और use करते हैं।
variable किसी value को दिया गया नाम है , variables named storage हैं जिनकी value need के according change हो सकती है।
●●●
तो किसी variable को define करने के लिए Variable Name दे दिया जाता है , और जो भी value आपको assign करनी है वो आप directly =
की help से assign कर सकते हैं।
ध्यान रहे ये case in-sensitive होते हैं , मतलब var / Var / VAR एक ही variable नाम है।
variable को define करने के लिए SET
statement का use किया जाता है।
SET MY_VARIABLE=10;
आप जिस भी type की value assign करेंगे variable उसी type का होगा , आपको manually variable type define करने की need नहीं है।
SET MY_VARIABLE='example';
आप single statement में ही Multiple variables को भी initialized कर सकते हैं।
जिसमे आपको एक set / tuple
में variables name और दूसरी तरफ set / tuple
में उन variables की value होगी। जो values , variables के क्रम according assign हो जाएँगी।
SET (VAR1, VAR2, VAR3)=(10, 20, 30);
even आप किसी table से single row fetch करके भी variables set कर सकते हैं।
SET (VAR1, VAR2, VAR3)=(SELECT col1, col2, col3 from table limit 1);
●●●
current session में defined सभी variables देखने के लिए , SHOW VARIABLES
command का use किया जाता है।
SHOW VARIABLES;
SQL में variables temporary storage की तरह use में लिए जाते हैं , ये सिर्फ current session तक ही exist करते हैं , जिसका मतलब है आप इन्हे बाद में use नहीं कर सकते हैं।
●●●
define किये गए variables को आप normally SELECT
statement के साथ और $
का use करके access कर सकते हैं।
SELECT $MY_VARIABLE;
SELECT $VAR1;
इन variables को आप directly query में भी use कर सकते हैं।
SET (MIN, MAX)=(40, 70);
SELECT $MIN;
SELECT AVG(SALARY) FROM EMP WHERE AGE BETWEEN $MIN AND $MAX;
●●●
variables को unset / delete करने के लिए UNSET
command का use क्या जाता है।
UNSET V1;
UNSET V2;
-- unset multiple variables at once.
UNSET (V1, V2);
●●●
Loading ...
Hi ! I'm Rahul Kumar Rajput founder of learnhindituts.com. I'm a software developer having more than 4 years of experience. I love to talk about programming as well as writing technical tutorials and blogs that can help to others. I'm here to help you navigate the coding cosmos and turn your ideas into reality, keep coding, keep learning :)
Get connected with me. :) LinkedIn Twitter Instagram Facebook