SlideShare une entreprise Scribd logo
1  sur  22
WHAT IS PHP PHP is a reflective programming language. Design for producing web pages. PHP is used for server side scripting. PHP is also called ‘HYPERTEXT PREPROCESSER’.
WHY PHP IS USED 1.EASY TO USE Code is embeded in HTML .The php code is enclosed in special start and tags that allow you to jump into and out of the php mode. SYNTAX <HTML> <TITLE></TITLE> <BODY> <?PHP   -------------- ?> </BODY> </HTML>
WHY PHP IS USED 2.CROSS PLATFORM  WEB SERVERS:  apache,wamp  OPERATING SYSTEM: unix,windows 2000,xp  DATBASES: mysql,oracle
3.COST BENIFITS ,[object Object]
THE ADDON TECHNOLOGIES USED IN PHP ARE ALSO FREE.EXAMPLE: i.software ii.Platform iii.tools
4.FAST & STABLE PHP is server side scripting language hence no additional plugins required. The exicution of php language is fast. The php is a stable language.
BASICS OF PHP *Lines end with semicolon(;). *Code block placed in braces. {    //code;   } *White space ignored. *Comment //comment(single line) /* ------(multiple line) */
BASICS OF PHP *SHORT PHP DELIMETERS <? statement; ?> *ASSIGN VALUE BY USING ‘=‘ OPERATOR. eg:  a=5; *PREFIX OPERATOR ‘$’ . *NO NEED TO DEFINE DATA TYPE.
BASICS OF PHP *VARIABLE NAME CASE SENSATIVE(NOT STATICALLY TYPED). *ESCAPE SEQUENCE ‘/’. *METHOD  (i) GET       ($_get)  (ii) POST       ($_post)
VARIABLE TYPES * BOOLEAN *ARRAY *INTEGER *FLOAT *STRING *OBJECT *DOUBLE
 PHP mail() – send email PHP mail() function is used for sending emails from your website. Syntax of mail() function is :  mail (to email , Subject of email , email message , header ,        additional parameters ); Here First parameter will be the email address of the receiver Second parameter will be the Subject ( title ) of your email Third parameter will be the content of your email , you can use html tags and all for proper formatting Third parameter is the header of your email, it will contain all the properties and setting for that email , sender email address also should specify in header , we can also add reply to address , format of email etc in header. Using detailed header is a good practice .
    ECHO in PHP echo is using for output one or more strings in PHP. echo is basically a language construct and not a function. So we can use without parentheses with it. We can use the HTML formatting tags with PHP echo statement See the following sample program with echo in PHP programs <?php echo "Good Morning";  ?>  Its out put will be :Good morning
   IF STATEMENT “if” statement is one of the most important and most used construct in PHP programming. Its syntax will look like if  (expression){// Operation statements} if statement’s return result will be a Boolean value like TRUE or FALSE. If the expression with “if statement” returns TRUE, the Operation Statements will execute , otherwise it will ignore the statements.
Array in PHP  Array is a special variable which can store multiple value. ( Note : a normal variable can store only one value at a time ). Arrays are the oldest and most important data structure which can hold multiple values. Each value in an array is associated with a key. And we can retrieve each value from array using the keys. Arrays can be mainly two types One-dimensional arrays Multidimensional arrays Array in PHP can be categorized as Numeric arrays Associative array Multidimensional array In PHP array can be declared using the construct array()
FOREACH ARRAY foreach statement is used for making loop over array in loop. It will work only with arrays, and will make errors if we try it with other data types.foreach statement can be used in two ways.. See the following two structures of foreach loop in PHP foreach (array as $value){// Operation statement} foreach (array as $key => $value){// Operation statement} Difference between these two syntax are In the first “foreach” statement , value of each array’s element will be assigned to the variable $value In the second “foreach” statement, key of each array’s element will be assigned to the variable $key
PHP cookie  Cookie is a variable stored in the user computer. Its a mechanism to store the data for future use. Cookies are part of HTTP header and will passed to the server when the site is accessing in browser.We can use cookies for knowing the return visitors or for storing a value in user computer. In PHP cookie is create using setcookie() function. And this function should be called in your PHP program before any output is sent to the user computer browser .We can store multiple values in a single cookie by declare the cookie as an array ( using [] with cookie variable name ).Here is the syntax for creating a cookiesetcookie (name, value, expiration time , path to store , domain name);  Consider a case. In our website there is a form to enter user’s name. And we need to store that name in his computer for next 30 days.Now we need to plan a cookie name for this, and we decided to put the name as “user_name”.
DATABASE Database is a computer based record keeping system. Rows in database called tuples. NULL !=0 TYPES: It has two types- i.Centralized ii.Distributed
KEYS CANDDATE KEYS retrive rows. SUPER KEYS set of candidate keys. PRIMARY KEYS this is unique not null. FOREGIEN KEYS join two databases.
MYSQL It is a non procedural programming language. QUERIES: >Creating database in sql server    Create database college >Create table student use college database    create table student    (      name char(25),      age int,      city char(23),      address char(34)     )
QUERIES >Insert data into table use college   insert into student values('ashok','34','udaipur','payada') >Display insert data    select * from student >SQL WHERE command : TheSQL WHERE clause is used to select data conditionally, by adding it to already existing SQL SELECT query. SELECT * FROM Customers WHERE Last_Name = 'Smith'
QUERIES >Modify the Structure of table 1 Adding new column into table alter table student add pincodeint 2 Delete column name use college    Alter table student drop column pincode 3 Delete Database    Drop database databasename
QUERIES >ORDER BY  The SQL ORDER BY clause comes in handy when you want to sort     your SQL resultsets by some column(s). For example if you want to select all the persons from the already familiar Customers table and order the result by date of birth, you will use the following statement: SELECT * FROM Customers ORDER BY DOB >AND  The SQL AND clause is used when you want to specify more than one condition inyour SQL WHERE clause, and at the same time you want all conditions to be true. SELECT * FROM Customers WHERE First_Name = 'John' AND Last_Name = 'Smith'

Contenu connexe

Tendances

Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0
Cathie101
 
Php1
Php1Php1
Php1
Reka
 
Open Source Package Php Mysql 1228203701094763 9
Open Source Package Php Mysql 1228203701094763 9Open Source Package Php Mysql 1228203701094763 9
Open Source Package Php Mysql 1228203701094763 9
isadorta
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
Reka
 
Programming with php
Programming with phpProgramming with php
Programming with php
salissal
 

Tendances (18)

Php
PhpPhp
Php
 
PHP
PHPPHP
PHP
 
Idoc script beginner guide
Idoc script beginner guide Idoc script beginner guide
Idoc script beginner guide
 
The Big Documentation Extravaganza
The Big Documentation ExtravaganzaThe Big Documentation Extravaganza
The Big Documentation Extravaganza
 
Unit 1
Unit 1Unit 1
Unit 1
 
Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4
 
Web technology html5 php_mysql
Web technology html5 php_mysqlWeb technology html5 php_mysql
Web technology html5 php_mysql
 
Php Learning show
Php Learning showPhp Learning show
Php Learning show
 
Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0
 
Php1
Php1Php1
Php1
 
Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1
 
Open Source Package Php Mysql 1228203701094763 9
Open Source Package Php Mysql 1228203701094763 9Open Source Package Php Mysql 1228203701094763 9
Open Source Package Php Mysql 1228203701094763 9
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
 
Linker scripts
Linker scriptsLinker scripts
Linker scripts
 
Php Unit 1
Php Unit 1Php Unit 1
Php Unit 1
 
PHP MySQL
PHP MySQLPHP MySQL
PHP MySQL
 
Lecture3 php by okello erick
Lecture3 php by okello erickLecture3 php by okello erick
Lecture3 php by okello erick
 
Programming with php
Programming with phpProgramming with php
Programming with php
 

En vedette

Final Project - Baseball Hall of Fame
Final Project - Baseball Hall of FameFinal Project - Baseball Hall of Fame
Final Project - Baseball Hall of Fame
Bernard ElDorrado
 
η συνταγματική αναθεώρηση
η συνταγματική αναθεώρησηη συνταγματική αναθεώρηση
η συνταγματική αναθεώρηση
Aphrodite Ghikas
 
HCL Infosystem
HCL InfosystemHCL Infosystem
HCL Infosystem
Anurag Dua
 

En vedette (19)

Hcl infosystem ltd
Hcl infosystem ltdHcl infosystem ltd
Hcl infosystem ltd
 
Sýnishorn
SýnishornSýnishorn
Sýnishorn
 
Sýnishorn
SýnishornSýnishorn
Sýnishorn
 
Final 8
Final 8Final 8
Final 8
 
Final Project - Baseball Hall of Fame
Final Project - Baseball Hall of FameFinal Project - Baseball Hall of Fame
Final Project - Baseball Hall of Fame
 
η συνταγματική αναθεώρηση
η συνταγματική αναθεώρησηη συνταγματική αναθεώρηση
η συνταγματική αναθεώρηση
 
mHabitat Digital Development Lab bootcamp
mHabitat Digital Development Lab bootcampmHabitat Digital Development Lab bootcamp
mHabitat Digital Development Lab bootcamp
 
Why use Yammer
Why use YammerWhy use Yammer
Why use Yammer
 
E newspaper
E newspaperE newspaper
E newspaper
 
HCL Infosystem
HCL InfosystemHCL Infosystem
HCL Infosystem
 
Mobility in healthcare
Mobility in healthcareMobility in healthcare
Mobility in healthcare
 
Capital school
Capital schoolCapital school
Capital school
 
Esped proj
Esped projEsped proj
Esped proj
 
\'Monastic Memento\'
\'Monastic Memento\'\'Monastic Memento\'
\'Monastic Memento\'
 
Technology Implementation Plan.
Technology Implementation Plan.Technology Implementation Plan.
Technology Implementation Plan.
 
Settlement
SettlementSettlement
Settlement
 
History Notes - The Plantations
History Notes - The PlantationsHistory Notes - The Plantations
History Notes - The Plantations
 
Hcl
HclHcl
Hcl
 
Customer Buying Preference towards Laptops A Comparative Analysis of Lenovo a...
Customer Buying Preference towards Laptops A Comparative Analysis of Lenovo a...Customer Buying Preference towards Laptops A Comparative Analysis of Lenovo a...
Customer Buying Preference towards Laptops A Comparative Analysis of Lenovo a...
 

Similaire à Php

Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Muhamad Al Imran
 
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Muhamad Al Imran
 
Lecture2_IntroductionToPHP_Spring2023.pdf
Lecture2_IntroductionToPHP_Spring2023.pdfLecture2_IntroductionToPHP_Spring2023.pdf
Lecture2_IntroductionToPHP_Spring2023.pdf
ShaimaaMohamedGalal
 

Similaire à Php (20)

Php
PhpPhp
Php
 
Php
PhpPhp
Php
 
Open Source Package PHP & MySQL
Open Source Package PHP & MySQLOpen Source Package PHP & MySQL
Open Source Package PHP & MySQL
 
Php interview questions
Php interview questionsPhp interview questions
Php interview questions
 
Php
PhpPhp
Php
 
Php i basic chapter 3
Php i basic chapter 3Php i basic chapter 3
Php i basic chapter 3
 
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
 
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
 
PHP Reviewer
PHP ReviewerPHP Reviewer
PHP Reviewer
 
Php interview questions
Php interview questionsPhp interview questions
Php interview questions
 
Lecture2_IntroductionToPHP_Spring2023.pdf
Lecture2_IntroductionToPHP_Spring2023.pdfLecture2_IntroductionToPHP_Spring2023.pdf
Lecture2_IntroductionToPHP_Spring2023.pdf
 
Php by shivitomer
Php by shivitomerPhp by shivitomer
Php by shivitomer
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 

Dernier

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 

Dernier (20)

Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 

Php

  • 1. WHAT IS PHP PHP is a reflective programming language. Design for producing web pages. PHP is used for server side scripting. PHP is also called ‘HYPERTEXT PREPROCESSER’.
  • 2. WHY PHP IS USED 1.EASY TO USE Code is embeded in HTML .The php code is enclosed in special start and tags that allow you to jump into and out of the php mode. SYNTAX <HTML> <TITLE></TITLE> <BODY> <?PHP -------------- ?> </BODY> </HTML>
  • 3. WHY PHP IS USED 2.CROSS PLATFORM WEB SERVERS: apache,wamp OPERATING SYSTEM: unix,windows 2000,xp DATBASES: mysql,oracle
  • 4.
  • 5. THE ADDON TECHNOLOGIES USED IN PHP ARE ALSO FREE.EXAMPLE: i.software ii.Platform iii.tools
  • 6. 4.FAST & STABLE PHP is server side scripting language hence no additional plugins required. The exicution of php language is fast. The php is a stable language.
  • 7. BASICS OF PHP *Lines end with semicolon(;). *Code block placed in braces. { //code; } *White space ignored. *Comment //comment(single line) /* ------(multiple line) */
  • 8. BASICS OF PHP *SHORT PHP DELIMETERS <? statement; ?> *ASSIGN VALUE BY USING ‘=‘ OPERATOR. eg: a=5; *PREFIX OPERATOR ‘$’ . *NO NEED TO DEFINE DATA TYPE.
  • 9. BASICS OF PHP *VARIABLE NAME CASE SENSATIVE(NOT STATICALLY TYPED). *ESCAPE SEQUENCE ‘/’. *METHOD (i) GET ($_get) (ii) POST ($_post)
  • 10. VARIABLE TYPES * BOOLEAN *ARRAY *INTEGER *FLOAT *STRING *OBJECT *DOUBLE
  • 11. PHP mail() – send email PHP mail() function is used for sending emails from your website. Syntax of mail() function is : mail (to email , Subject of email , email message , header , additional parameters ); Here First parameter will be the email address of the receiver Second parameter will be the Subject ( title ) of your email Third parameter will be the content of your email , you can use html tags and all for proper formatting Third parameter is the header of your email, it will contain all the properties and setting for that email , sender email address also should specify in header , we can also add reply to address , format of email etc in header. Using detailed header is a good practice .
  • 12. ECHO in PHP echo is using for output one or more strings in PHP. echo is basically a language construct and not a function. So we can use without parentheses with it. We can use the HTML formatting tags with PHP echo statement See the following sample program with echo in PHP programs <?php echo "Good Morning"; ?> Its out put will be :Good morning
  • 13. IF STATEMENT “if” statement is one of the most important and most used construct in PHP programming. Its syntax will look like if  (expression){// Operation statements} if statement’s return result will be a Boolean value like TRUE or FALSE. If the expression with “if statement” returns TRUE, the Operation Statements will execute , otherwise it will ignore the statements.
  • 14. Array in PHP Array is a special variable which can store multiple value. ( Note : a normal variable can store only one value at a time ). Arrays are the oldest and most important data structure which can hold multiple values. Each value in an array is associated with a key. And we can retrieve each value from array using the keys. Arrays can be mainly two types One-dimensional arrays Multidimensional arrays Array in PHP can be categorized as Numeric arrays Associative array Multidimensional array In PHP array can be declared using the construct array()
  • 15. FOREACH ARRAY foreach statement is used for making loop over array in loop. It will work only with arrays, and will make errors if we try it with other data types.foreach statement can be used in two ways.. See the following two structures of foreach loop in PHP foreach (array as $value){// Operation statement} foreach (array as $key => $value){// Operation statement} Difference between these two syntax are In the first “foreach” statement , value of each array’s element will be assigned to the variable $value In the second “foreach” statement, key of each array’s element will be assigned to the variable $key
  • 16. PHP cookie Cookie is a variable stored in the user computer. Its a mechanism to store the data for future use. Cookies are part of HTTP header and will passed to the server when the site is accessing in browser.We can use cookies for knowing the return visitors or for storing a value in user computer. In PHP cookie is create using setcookie() function. And this function should be called in your PHP program before any output is sent to the user computer browser .We can store multiple values in a single cookie by declare the cookie as an array ( using [] with cookie variable name ).Here is the syntax for creating a cookiesetcookie (name, value, expiration time , path to store , domain name); Consider a case. In our website there is a form to enter user’s name. And we need to store that name in his computer for next 30 days.Now we need to plan a cookie name for this, and we decided to put the name as “user_name”.
  • 17. DATABASE Database is a computer based record keeping system. Rows in database called tuples. NULL !=0 TYPES: It has two types- i.Centralized ii.Distributed
  • 18. KEYS CANDDATE KEYS retrive rows. SUPER KEYS set of candidate keys. PRIMARY KEYS this is unique not null. FOREGIEN KEYS join two databases.
  • 19. MYSQL It is a non procedural programming language. QUERIES: >Creating database in sql server Create database college >Create table student use college database create table student ( name char(25), age int, city char(23), address char(34) )
  • 20. QUERIES >Insert data into table use college insert into student values('ashok','34','udaipur','payada') >Display insert data select * from student >SQL WHERE command : TheSQL WHERE clause is used to select data conditionally, by adding it to already existing SQL SELECT query. SELECT * FROM Customers WHERE Last_Name = 'Smith'
  • 21. QUERIES >Modify the Structure of table 1 Adding new column into table alter table student add pincodeint 2 Delete column name use college Alter table student drop column pincode 3 Delete Database Drop database databasename
  • 22. QUERIES >ORDER BY The SQL ORDER BY clause comes in handy when you want to sort your SQL resultsets by some column(s). For example if you want to select all the persons from the already familiar Customers table and order the result by date of birth, you will use the following statement: SELECT * FROM Customers ORDER BY DOB >AND The SQL AND clause is used when you want to specify more than one condition inyour SQL WHERE clause, and at the same time you want all conditions to be true. SELECT * FROM Customers WHERE First_Name = 'John' AND Last_Name = 'Smith'
  • 23. THANK YOU