https://www.learntek.org/blog/mysql-python/
https://www.learntek.org/
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
https://speakerdeck.com/willroth/50-laravel-tricks-in-50-minutes - origin
Laravel 5.1 raised the bar for framework documentation, but there's much, much more lurking beneath the surface. In this 50-minute session, we'll explore 50 (yes, 50!) high-leverage implementation tips & tricks that you just won't find in the docs: the IoC Container, Blade, Eloquent, Middleware, Routing, Commands, Queues, Events, Caching — we'll cover them all! Join us as we drink from the fire hose & learn to take advantage of everything that Laravel has to offer to build better software faster!
SQLAlchemy is a popular database framework that provides an ORM and a schema centric query language, and in this talk we will take a look how to get started with the ORM. We'll learn how to establish connections to popular databases such as PostgreSQL and MySQL. Then we will look at how to define our models as user classes including relationships and persist them to the database. Next, we'll cover the how the SQLAlchemy session works with typical create, update, read, and delete operations. We'll wrap up with pointers of where to go next to learn more.
https://speakerdeck.com/willroth/50-laravel-tricks-in-50-minutes - origin
Laravel 5.1 raised the bar for framework documentation, but there's much, much more lurking beneath the surface. In this 50-minute session, we'll explore 50 (yes, 50!) high-leverage implementation tips & tricks that you just won't find in the docs: the IoC Container, Blade, Eloquent, Middleware, Routing, Commands, Queues, Events, Caching — we'll cover them all! Join us as we drink from the fire hose & learn to take advantage of everything that Laravel has to offer to build better software faster!
SQLAlchemy is a popular database framework that provides an ORM and a schema centric query language, and in this talk we will take a look how to get started with the ORM. We'll learn how to establish connections to popular databases such as PostgreSQL and MySQL. Then we will look at how to define our models as user classes including relationships and persist them to the database. Next, we'll cover the how the SQLAlchemy session works with typical create, update, read, and delete operations. We'll wrap up with pointers of where to go next to learn more.
Presentation given at OSCON 2009 and PostgreSQL West 09. Describes SQL solutions to a selection of object-oriented problems:
- Extensibility
- Polymorphism
- Hierarchies
- Using ORM in MVC application architecture
These slides are excerpted from another presentation, "SQL Antipatterns Strike Back."
Powerpoint file(incl. animations!): http://db.tt/ktTDiQSG
Demostration module with example: http://db.tt/Ix2ovTno
This is the slides of the presentation "Drupal & Javascript" who presented at DrupalCamp Israel 2012.
You find a column named EntityNum in a table you manage, but what data belongs in this column? Not every detail of usage is clear from just SQL data type and constraints. What is the sensible range of values? Unit of measure? How is the column used by applications? Who in the world knows? We need a way to add comments to the database schema, just as we would write comments in application code to document how programmers should use it. But comments are useful only if they're correct and current, and if they're easy to read and to update. Schemadoc is an experimental tool to help in these goals.
What is PHP?
PHP stands for "PHP Hypertext Preprocessor”
An embedded scripting language for HTML like ASP or JSP
A language that combines elements of Perl, C, and Java
Struts is a MVC framework and not a database framework but it provides excellent support for JPA/Hibernate integration. We shall look at the hibernate integration in a later chapter, but in this chapter we shall use plain old JDBC to access the database.
This presentation educates you about Python MySQL - Database Connection, Python MySQL - Database Connection, Establishing connection with MySQL using python with sample program.
For more topics stay tuned with Learnbay.
Presentation given at OSCON 2009 and PostgreSQL West 09. Describes SQL solutions to a selection of object-oriented problems:
- Extensibility
- Polymorphism
- Hierarchies
- Using ORM in MVC application architecture
These slides are excerpted from another presentation, "SQL Antipatterns Strike Back."
Powerpoint file(incl. animations!): http://db.tt/ktTDiQSG
Demostration module with example: http://db.tt/Ix2ovTno
This is the slides of the presentation "Drupal & Javascript" who presented at DrupalCamp Israel 2012.
You find a column named EntityNum in a table you manage, but what data belongs in this column? Not every detail of usage is clear from just SQL data type and constraints. What is the sensible range of values? Unit of measure? How is the column used by applications? Who in the world knows? We need a way to add comments to the database schema, just as we would write comments in application code to document how programmers should use it. But comments are useful only if they're correct and current, and if they're easy to read and to update. Schemadoc is an experimental tool to help in these goals.
What is PHP?
PHP stands for "PHP Hypertext Preprocessor”
An embedded scripting language for HTML like ASP or JSP
A language that combines elements of Perl, C, and Java
Struts is a MVC framework and not a database framework but it provides excellent support for JPA/Hibernate integration. We shall look at the hibernate integration in a later chapter, but in this chapter we shall use plain old JDBC to access the database.
This presentation educates you about Python MySQL - Database Connection, Python MySQL - Database Connection, Establishing connection with MySQL using python with sample program.
For more topics stay tuned with Learnbay.
Session presented at Oracle Developer Live - MySQL, 2020. Recording available at https://developer.oracle.com/developer-live/mysql/
Abstract:
MySQL Shell is the new, advanced command-line client and editor for MySQL. It sends SQL statements to MySQL server, supports both the classic MySQL protocol and the newer X protocol, and provides scripting capabilities for JavaScript and Python. But there's more to MySQL Shell than meets the eye. It delivers a natural and powerful interface for all DevOps tasks related to MySQL by providing APIs for development and administration. This session covers MySQL Shell's core features, along with demonstrations of how to use the various APIs and how to extend MySQL Shell. We’ll address the regular interaction with databases, the built-in tools that make DBAs and developers’ lives easier, the easy and flawless set up of HA architectures, and the plugins and extensions framework.
All Things Open 2016 -- Database Programming for NewbiesDave Stokes
This presentation covers much a new developer needs to know about working WITH a database instead of against it. Plus there is much on what goes on behind the scenes when you submit a query and hints on how to avoid the big problems that can ruin your data
This beginning terraform workshop will teach you how to safely create and provision Infrastructure as Code (IAC) using Hashicorp Terraform in an AWS environment. In this class you will learn how to setup and install terraform. You will also be given a walkthrough of Terraform fundamentals. You will be lead through the process of deploying a single server, deploying a cluster and setting up a load balancer. You will also learn how to author Terraform Modules, work with Route53 and how to manage DNS.
Requirements. You will need to have an AWS account set up already with Terraform v0.9.3 installed. You will also need to have git install to download the workshop material.
You can find more informaiton on how to install terraform here: https://www.terraform.io/intro/getting-started/install.html. You can sign up for an AWS account here: https://aws.amazon.com/account/
https://github.com/jasonvance/terraform-introduction
Designer's Favorite New Features in SQLServerKaren Lopez
A database designer's favourte features in SQL Server...with a bit of Azure SQL DB, too.
Always Encrypted
Row Level Security
Microsoft Purview
Azure Enabled SQL Server
Azure Defender for SQL
Azure Defender for Cloud
Dynamic Data Masking
Ledger Database and Tables
Data Privacy
Data Governance
JavaScript and Friends August 20th, 20201 -- MySQL Shell and JavaScriptDave Stokes
The MySQL Shell has a JavaScript mode where you can use JS libraries to access you data and you can also write (and save) your own custom reports (or programs) for future use.
A Designer's Favourite Security and Privacy Features in SQL Server and Azure ...Karen Lopez
SQL Server includes multiple features that focus on data security, privacy, and developer productivity. In this session, we will review the best features from a database designer’s and developer’s point of view.
– Always Encrypted
– Dynamic Data Masking
– Row Level Security
– Data Classification
– Assessments
– Defender for SQL Server
– Ledger Tables
…and more
We’ll look at new and older features, why you should consider them, where they work, where they don’t, who needs to be involved in using them, and what changes, if any, need to be made to applications or tools that you use with SQL Server.
You will learn:
– The pros and cons of implementing each feature
– How implementing these new features may impact existing applications
– 10 tips for enhancing SQL Server security and privacy protections
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
https://www.learntek.org/apache-flink/
https://www.learntek.org/
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
Apache Flink Training
https://www.learntek.org/apache-flink/
https://www.learntek.org/
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
https://www.learntek.org/angular-training/
https://www.learntek.org/
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
https://www.learntek.org/blog/mysql-python/
https://www.learntek.org/
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
https://www.learntek.org/cucumber-testing/
https://www.learntek.org/
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
https://www.learntek.org/
https://www.learntek.org/blog/apache-kafka/
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
https://www.learntek.org/blog/apache-kafka/
https://www.learntek.org/
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
https://www.learntek.org/google-cloud-platform-gcp-training/
https://www.learntek.org/
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
https://www.learntek.org/google-cloud-platform-gcp-training/
https://www.learntek.org/
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
https://www.learntek.org/apache-spark-with-java/
https://www.learntek.org/
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
https://www.learntek.org/apache-spark-with-java/
https://www.learntek.org/
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
Categorizing and pos tagging with nltk pythonJanu Jahnavi
https://www.learntek.org/blog/categorizing-pos-tagging-nltk-python/
https://www.learntek.org/
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
Categorizing and pos tagging with nltk pythonJanu Jahnavi
https://www.learntek.org/blog/categorizing-pos-tagging-nltk-python/
https://www.learntek.org/
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
https://www.learntek.org/blog/python-multithreading/
https://www.learntek.org/
Learntek is global online training provider on Big Data Analytics, Hadoop, Machine Learning, Deep Learning, IOT, AI, Cloud Technology, DEVOPS, Digital Marketing and other IT and Management courses.
Thinking of getting a dog? Be aware that breeds like Pit Bulls, Rottweilers, and German Shepherds can be loyal and dangerous. Proper training and socialization are crucial to preventing aggressive behaviors. Ensure safety by understanding their needs and always supervising interactions. Stay safe, and enjoy your furry friends!
Safalta Digital marketing institute in Noida, provide complete applications that encompass a huge range of virtual advertising and marketing additives, which includes search engine optimization, virtual communication advertising, pay-per-click on marketing, content material advertising, internet analytics, and greater. These university courses are designed for students who possess a comprehensive understanding of virtual marketing strategies and attributes.Safalta Digital Marketing Institute in Noida is a first choice for young individuals or students who are looking to start their careers in the field of digital advertising. The institute gives specialized courses designed and certification.
for beginners, providing thorough training in areas such as SEO, digital communication marketing, and PPC training in Noida. After finishing the program, students receive the certifications recognised by top different universitie, setting a strong foundation for a successful career in digital marketing.
The simplified electron and muon model, Oscillating Spacetime: The Foundation...RitikBhardwaj56
Discover the Simplified Electron and Muon Model: A New Wave-Based Approach to Understanding Particles delves into a groundbreaking theory that presents electrons and muons as rotating soliton waves within oscillating spacetime. Geared towards students, researchers, and science buffs, this book breaks down complex ideas into simple explanations. It covers topics such as electron waves, temporal dynamics, and the implications of this model on particle physics. With clear illustrations and easy-to-follow explanations, readers will gain a new outlook on the universe's fundamental nature.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
This presentation was provided by Steph Pollock of The American Psychological Association’s Journals Program, and Damita Snow, of The American Society of Civil Engineers (ASCE), for the initial session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session One: 'Setting Expectations: a DEIA Primer,' was held June 6, 2024.
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
This presentation includes basic of PCOS their pathology and treatment and also Ayurveda correlation of PCOS and Ayurvedic line of treatment mentioned in classics.
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Dr. Vinod Kumar Kanvaria
Exploiting Artificial Intelligence for Empowering Researchers and Faculty,
International FDP on Fundamentals of Research in Social Sciences
at Integral University, Lucknow, 06.06.2024
By Dr. Vinod Kumar Kanvaria
2. CHAPTER – 4
THE BASICS OF SEARCH ENGINE FRIENDLY DESIGN & DEVELOPMENT
3. Copyright @ 2019 Learntek. All Rights Reserved. 3
MySQL Python : About MySQL
•MySQL is a fast, easy to use relational database. It is currently the most popular
open-source database
•MySQL is used for many small and big businesses. It is developed, marketed and
supported by MySQL AB, a Swedish company. It is written in C and C++.
•MySQL is an open-source database, so you don’t have to pay a single penny to
use it.
MySQL Features
•MySQL is a fast, easy to use relational database.
•MySQL is used for many small and big businesses.
•MySQL is an open-source database, so you don’t have to pay for it.
4. Copyright @ 2019 Learntek. All Rights Reserved. 4
Download MySQL
Follow these steps:
Go to MySQL official website http://www.mysql.com/downloads/
Choose the version number for MySQL community server which you want.
MySQL Python Connector
MySQL Python Connector is used to access the MySQL database from Python, you
need a database driver. MySQL Connector/Python is a standardized database driver
provided by MySQL.
To check it wether mysql.connector is available or not we type following command
>>> import mysql.connector
6. Copyright @ 2019 Learntek. All Rights Reserved. 6
After typing this we clearly say that No Module Named as a MySQL is present.
Then we have to install MySQL. Connector for Python. Python needs a MySQL
driver to access the MySQL database.
So, in next we download the mysql-connector with use of pip
C:UsersNitin Arvind Shelke>pip install mysql-connector
8. Copyright @ 2019 Learntek. All Rights Reserved. 8
After installation we test it whether it work or not, lets check with the following
command
>>> import mysql.connector
10. Copyright @ 2019 Learntek. All Rights Reserved. 10
The above line imports the MySQL Connector Python module in your program, so
you can use this module’s API to connect MySQL.
If the above code was executed with no errors, the we can say that “MySQL
Connector” is installed properly and get ready to use of it.
>>>from mysql.connector import Error
MySQL connector Error object is used to show us an error when we failed to
connect Databases or if any other database error occurred while working with the
database.
11. Copyright @ 2019 Learntek. All Rights Reserved. 11
Creating a connection to the database.
After installing the MySQL Python connector, we need to test it to make sure that
it is working correctly, and you can connect to the MySQL database server without
any problems. To verify the installation, you use the following steps:
Type the following line of code
>>> import mysql.connector
To establish a connection to the database we should know the following parameters,
Host= localhost (In general it is same for all)
Database=mysql (You can set as per your wish)
User=root (It is a username)
Password= root@123 (password set by me while installation of MyQL)
>>> mysql.connector.connect( host = 'localhost', database = 'mysql', user = 'root', password = 'root@123')
13. Copyright @ 2019 Learntek. All Rights Reserved. 13
Show the available Database
You can check if a database exists on your system by listing all databases in your
system by using the “SHOW DATABASES” statement:
>> my_database = mysql.connector.connect( host = 'localhost', database = 'mysql', user = 'root', password = 'root@123’)
>>> cursor = my_database.cursor().
>>> cursor.execute( " show databases " )
>>> for db in cursor:
... print(db)
…
14. Copyright @ 2019 Learntek. All Rights Reserved. 14
Output
('bank’,)
('information_schema’,)
('mysql’,)
('performance_schema’,)
('sakila’,)
('sys’,)
('world’,)
>>>
16. 16
Creating a Database
To create a database in MySQL, we use the “CREATE DATABASE”
statement to create the database named as “college”:
>>> my_database = mysql.connector.connect( host = 'localhost', user = 'root', password = 'root@123’ )
>>> cursor = my_database.cursor()
>>> cursor.execute( " CREATE DATABASE college " )
>>> for db in cursor:
... print(db)
...
>>> cursor.execute( " show databases " )
>>> for db in cursor:
... print(db)
...
Copyright @ 2019 Learntek. All Rights Reserved.
18. Copyright @ 2019 Learntek. All Rights Reserved. 18
Creating the Tables
Next, we create the tables for the ‘college’ database.
It is compulsory to define the name of the database while creating the tables for it.
Syntax to create the table is
create table_name(
column 1 datatype,
column 2 datatype,
column 3 datatype,
…………………………………………,
column n datatype
)
19. Copyright @ 2019 Learntek. All Rights Reserved. 19
Let’s create the table students, department and faculty for the database college.
>>> my_database = mysql.connector.connect ( host = 'localhost', database =
'college', user = 'root', password = 'root@123’ )
>>> cursor = my_database.cursor()
>>>cursor. execute( " CREATE TABLE students ( stud_id varchar(200), stud_name
VARCHAR(215), address VARCHAR(215), city char(100)) " )
>>> cursor. execute( " CREATE TABLE department ( dept_id varchar(200), dept_name
VARCHAR(215)) " )
>>> cursor.execute( "CREATE TABLE faculty ( faculty_id varchar(200),faculty_name
VARCHAR(215) )" )
20. Copyright @ 2019 Learntek. All Rights Reserved. 20
Show the tables
To display the tables, we will have to use the “SHOW TABLES”
Following code display the all the tables present in the database “college”
>>> cursor. execute ( " SHOW TABLES " )
>>> for x in cursor:
... print(x)
...
('department’,)
('faculty’,)
('students',)
22. Copyright @ 2019 Learntek. All Rights Reserved. 22
Assign Primary key in table
Primary key : It is a minimal set of attributes (columns) in a table or relation that
can uniquely identifies tuples (rows) in that table.
For example, Student (Stud_Roll_No, Stud_Name, Addr)
In the student relation, attribute Stud_Roll_No alone is a primary key as each
student has a unique id that can identify the student record in the table.
>>> my_database = mysql.connector.connect ( host = 'localhost', database =
'college', user = 'root', password = 'root@123’ )
>>> cursor = my_database.cursor()
>>>cursor. execute( " CREATE TABLE students2 ( stud_id varchar(200) PRIMARY
KEY, stud_name VARCHAR(215), address VARCHAR(215), city char(100)) " )
23. Copyright @ 2015 Learntek. All Rights Reserved. 23
If the table already exists, use the ALTER TABLE keyword:
>>> my_database = mysql.connector.connect ( host = 'localhost', database = 'college',
user = 'root', password = 'root@123’ )
>>> cursor = my_database.cursor()
>>>cursor.execute( " ALTER TABLE student ADD COLUMN id INT AUTO_INCREMENT PRIMARY
KEY " )
24. Copyright @ 2019 Learntek. All Rights Reserved. 24
Describe the created tables
Desc keyword is used to describe the table in MySQL.
Following code describe the students table from the database college
>>> cursor.execute("desc students")
>>> for x in cursor:
... print(x)
...
('stud_id', 'varchar(200)', 'YES', '', None, ‘’)
('stud_name', 'varchar(215)', 'YES', '', None, ‘’)
('address', 'varchar(215)', 'YES', '', None, ‘’)
('city', 'char(100)', 'YES', '', None, ‘’)
>>>
Example 2
Following code describe the students2 (where stud_id is mentioned as primary key)
table from the database college
25. Copyright @ 2019 Learntek. All Rights Reserved. 25
>>> cursor.execute("desc students2")
>>> for x in cursor:
...
print(x) ...
('stud_id', 'varchar(200)', 'NO', 'PRI', None, ‘’)
('stud_name', 'varchar(215)', 'YES', '', None, ‘’)
('address', 'varchar(215)', 'YES', '', None, ‘’)
('city', 'char(100)', 'YES', '', None, ‘’)
>>>
27. Copyright @ 2019 Learntek. All Rights Reserved. 27
Insert data into the Table
To insert the data into the table, “insert into” statement is used,
Let’s insert the data into the table students of college database,
>>> my_database = mysql.connector.connect ( host = 'localhost', database = 'college', user
= 'root', password = 'root@123’ )
>>> stm = " INSERT INTO students ( stud_id, stud_name, address, city ) VALUES ('101','Nitin
Shelke', 'Congress Nagar', 'Amravati' ) “
>>> cursor = my_database.cursor()
>>> cursor.execute(stm)
28. Copyright @ 2019 Learntek. All Rights Reserved. 28
Display or select the inserted data from the Table
>>> cursor.execute(" select * from students")
>>> for x in cursor:
...
print(x) ...
('101', 'Nitin Shelke', 'Congress Nagar', 'Amravati')
29. Copyright @ 2019 Learntek. All Rights Reserved. 29
Alternate way is to use the fetchall() method
>>> cursor.fetchall()
[(‘101’, ‘Nitin Shelke’, ‘Congress Nagar’, ‘Amravati’)]
30. Copyright @ 2019 Learntek. All Rights Reserved. 30
For more Training Information , Contact Us
Email : info@learntek.org
USA : +1734 418 2465
INDIA : +40 4018 1306
+7799713624