<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Madhu babu Duggirala</title>
    <description>The latest articles on DEV Community by Madhu babu Duggirala (@madhuraj9030).</description>
    <link>https://dev.to/madhuraj9030</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1782911%2Fd3d5b95d-ba33-4f24-b7a3-05b74ae9c14c.jpeg</url>
      <title>DEV Community: Madhu babu Duggirala</title>
      <link>https://dev.to/madhuraj9030</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/madhuraj9030"/>
    <language>en</language>
    <item>
      <title>SQL- Commands intro</title>
      <dc:creator>Madhu babu Duggirala</dc:creator>
      <pubDate>Thu, 18 Jul 2024 15:48:52 +0000</pubDate>
      <link>https://dev.to/madhuraj9030/sql-commands-intro-dfh</link>
      <guid>https://dev.to/madhuraj9030/sql-commands-intro-dfh</guid>
      <description>&lt;h5&gt;
  
  
  Structure Query Language(SQL)
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;SQL is a collection of statements used to communicate with Data Bases. SQL can also be called as Sequel.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To communicate with data bases human needs a language that is SQL. In the same way SQL also needs some set of commands to communicate with database.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you are going to start SQL. You need keep know basic elements of database.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Database contains 'n' number of schemas, Schemas contains 'n' number of tables, Tables contains 'n' number of rows and columns.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4g184w00q88wjfpmfaet.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4g184w00q88wjfpmfaet.jpg" alt="DataBase_visualisation" width="300" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In SQL there are five commands in total:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;DQL(Data Query Language).&lt;/li&gt;
&lt;li&gt;DDL(Data Definition Language).&lt;/li&gt;
&lt;li&gt;DML(Data Manipulation Language).&lt;/li&gt;
&lt;li&gt;DCL(Data Control Language).&lt;/li&gt;
&lt;li&gt;TCL(Transaction Control Language).&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Further I will also share some shortcuts to remember commands in sql&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg6y6z5voyvnlx82n4t3r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg6y6z5voyvnlx82n4t3r.png" alt="SQL Commands chart" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Data Query Language(DQL):
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;The name itself specifies that this is a query language.(Query is a statement to retrieve something from the database with some conditions included in it).&lt;/li&gt;
&lt;li&gt;DQL has only one command i.e. &lt;strong&gt;SELECT&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h6&gt;
  
  
  Syntax:
&lt;/h6&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT column1,column2,column3.....
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h5&gt;
  
  
  Data Definition Language(DDL):
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;DDL commands are used to define the structure of the schemas i.e, it defines the structure of tables etc..&lt;/li&gt;
&lt;/ul&gt;
&lt;h6&gt;
  
  
  Syntax:
&lt;/h6&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;```&amp;lt;DDL_Command&amp;gt; Table &amp;lt;table_name&amp;gt;```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;It contains 5 commands:

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;D&lt;/strong&gt;ROP&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;R&lt;/strong&gt;ENAME&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C&lt;/strong&gt;REATE&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A&lt;/strong&gt;LTER&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;T&lt;/strong&gt;RUNCATE&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;To remember commands easily follow the first letter of each command which is DR.CAT&lt;/em&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Data Manipulation Language(DML):
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;DML commands are used to manipulate the data present in the data base.&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  Syntax:
&lt;/h5&gt;



&lt;p&gt;&lt;code&gt;&amp;lt;DML_Command&amp;gt; &amp;lt;table_name&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It contains 5 commands:

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;L&lt;/strong&gt;OCK&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;U&lt;/strong&gt;PDATE&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C&lt;/strong&gt;ALL&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I&lt;/strong&gt;NSERT&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;D&lt;/strong&gt;DELETE&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;To remember commands easily follow the first letter of each command which is LUCID&lt;/em&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Data Control Language(DCL):
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DCL commands delay with permissions and rights in the database.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It contains 5 commands:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;GRANT&lt;/li&gt;
&lt;li&gt;REVOKE&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  Transaction Control Language(TCL):
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Transaction: Transaction is a set of SQL statements.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Transactions are categorised into 3 types: &lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Explicit&lt;/li&gt;
&lt;li&gt;Implicit&lt;/li&gt;
&lt;li&gt;Auto commit&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;To control the flow of sql statements commands of TCL is used.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;TCL contains 3 commands:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Commit&lt;/li&gt;
&lt;li&gt;Rollback&lt;/li&gt;
&lt;li&gt;Savepoint&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h6&gt;
  
  
  Checkout my design: &lt;a href="https://www.figma.com/design/mwA3dlOOkqVYqd60DCMtDd/Untitled?node-id=0-1&amp;amp;t=RHULXjtvjk5ElZJd-1" rel="noopener noreferrer"&gt;SQL Commands&lt;/a&gt;
&lt;/h6&gt;

&lt;p&gt;In this Blog, I covered some prerequisites, essential SQL commands and share tips to easily remember. Whether you're a beginner or an experienced developer, there's something valuable for everyone.&lt;/p&gt;

&lt;p&gt;Don't miss out on this opportunity to level up your SQL. Check out the blog and let me know what you think. &lt;/p&gt;

&lt;p&gt;Your appreciation and follows really motivate me to create more content like this. If you feel that you’ve learned something, please hit the follow button and let me know what you think. 😊&lt;/p&gt;

&lt;p&gt;👉 follow me on &lt;a href="https://www.linkedin.com/in/madhubabuduggirala/" rel="noopener noreferrer"&gt;Linkedin &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>sql</category>
      <category>sqlserver</category>
    </item>
  </channel>
</rss>
