MySQL + SQL · Lesson 42

INSERT INTO Command

INSERT INTO

INSERT command table में नई rows जोड़ता है।
INSERT INTO students (roll_no, name, marks)
VALUES (1, 'Aman', 88);

कई Rows Insert करें

INSERT INTO students (roll_no, name, marks) VALUES
(2, 'Riya', 91),
(3, 'Karan', 76);
एक command में 3 rows insert हुईं।

Tips

  • अगर सभी columns की values क्रम में दें तो column list optional है।
  • Text values single quotes में; numbers नहीं।

सारांश

  • INSERT INTO table (cols) VALUES (...)।
  • एक statement में कई rows insert हो सकती हैं।
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

💻 लाइव कोड एडिटर

इस पेज के प्रोग्राम यहीं तैयार हैं — चलाएँ, बदलें और सीखें। कुछ भी इंस्टॉल किए बिना।
OneCompiler द्वारा संचालित। कोड एडिटर में अपने आप आ जाता है — Run दबाकर आउटपुट देखें। अगर एडिटर न खुले तो नए टैब में खोलें.