PyCodePro

Previously LP16 - A website that teaches Python programming language through interactive tutorials, practice exercises, and real-world projects.

Commands In SQL

SQL COMMANDS

IN PREVIOUS BLOG

In our previous Blog we learn About the terms in SQL and we are also able to know that how to create a data base in SQL . The Previous Blog Is all about the DDL which is Data Manipulation Language and in this blog we learn some commands on SQL which Help us to make and edit the table in the SQL Command Line and if some time is left i will also try to start the DML which is Data Manipulation Language Now after a long overview of todays blog lets start our todays blog lets begin -

Creating Table

In SQL the tables are the most important thing and to make a table in  SQL We Need To know that for making the table we have to enter all the information in a single line and the we need to execute the commands in the end of the line and in that single line we need to enter the rows , columns tuples , keys which we use in the table and the attributes and the range of the variables and the SQL is not a case sensitive language we can enter the alphabets in small character or large character the SQL command line will execute and display the table .

Now for making the tables we need to enter the command -

CREATE TABLE

and you need to remember that you should create the table under the data base we you created when you open SQL for the first time .

After writing the command CREATE TABLE you need to give the name to the table after the command line CREATE TABLE

now for example we will create a table named Students

now the command to create a table students is -

CREATE TABLE STUDENTS

now after creating the table we need to make the rows and the columns of the table and remember one thing that the roll no , name , phone no , percentage , address they are the most important things they are the things which a teacher usually enter in there data ' s so that we need to enter the rows and columns and after making the table the to use the table we need to enter the another command use , use is the one command which will executes without semi column and all the commands in SQL Needs semi - column to executes now to use the table we need to enter the command as -

USE TABLE STUDENTS

Now after using the table we need to enter the rows and the columns which we are adding -

Adding Rows And Columns

( roll_no int ( 2 ) primary key , name char ( 15 ) not null , phone_no varchar ( 12 ) ;

now the roll_no is the variable and the int is the data type and 2 under parenthesis signifies that no student should not have the roll no greater than two digits and the name is the character so we give the data type as the character and no name should have greater than 15 characters and now further you can relate the same and after these commands we will learn more about SQL in brief . Thank You

IN THE NEXT BLOG WE LEARN MORE ABOUT THE DDL IN THE SQL  AND THE OTHER WORKING  IN PYTHON AND OTHER IMPORTANT SUB TOPICS  THANK YOU FOR VISITING KEEP LEARNING STAY TUNED FOR NEXT BLOG FOLLOW OUR BLOG FOR REGULAR UPDATES VIEW OUR PREVIOUS BLOG FOR THE BASIC CONCEPTS OF PYTHON AND OTHER BASIC CONCEPTS OF COMPUTER AND ALSO FOR THE IMPORTANT DEFINITIONS OF THE SQLVISIT OUR SECOND BLOG – indianbasics.blogspot.com VISIT OUR YOUTUBE CHANNEL -  Learn Python Our youtube channel will give you the short motivational speeches of the great person in the present there is only one motivational video on channel but in future I will upload the motivational videos soon .VISIT OUR INSTAGRAM PAGE – instagram.com/learnpython16 Out instagram page is also a new page i9 have just crated few hours ago but stay tuned I will upload the post very soon . Please support us by following our blog and by subscribing our youtube channel and by following our instagram page .

Commands In SQL Commands In SQL Reviewed by Learn Python on December 08, 2019 Rating: 5

No comments:

Powered by Blogger.