• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Tables And SQL basics
 

Tables And SQL basics

on

  • 13,484 views

it is very basic introduction to SQL statements, using access syntax

it is very basic introduction to SQL statements, using access syntax

Statistics

Views

Total Views
13,484
Views on SlideShare
7,496
Embed Views
5,988

Actions

Likes
6
Downloads
582
Comments
2

22 Embeds 5,988

http://www.techbaba.com 4492
http://www.itestiwin.com 1101
http://shawwebsitedesign.jimdo.com 164
http://www37.jimdo.com 97
http://www.istudyiwin.com 59
http://dadoctor.net 22
http://translate.googleusercontent.com 12
http://www.slideshare.net 8
http://kkarthiit.blogspot.in 6
http://webcache.googleusercontent.com 5
http://www.brijj.com 4
http://www.kkarthiit.blogspot.com 3
http://182.50.141.149 2
http://istudyiwin.com 2
http://www.classes4you.net 2
http://studycercle.blogspot.com 2
http://staging.itestiwin.com 2
http://www.kkarthiit.blogspot.in 1
http://kkarthiit.blogspot.com 1
http://www.studycercle.blogspot.com 1
http://74.125.153.132 1
http://209.85.175.132 1
More...

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

12 of 2 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Tables And SQL basics Tables And SQL basics Presentation Transcript

  • TABLES AND SQL Controlling Tables Programmatically By: Amit Kumar Singh
  • Tables
    • 2 Dimensional matrix
    • Unique name
  • SQL
    • S tructured Q uery L anguage
    • ANSI standard computer language
    • Allows you to access a database
    • Execute queries, retrieve, insert, delete, update records
    • Freedom from intricacy & details of database softwares.
    • EASY TO LEARN
  • Creating Tables
    • CREATE TABLE table_name
    • ( column_name1 data_type , column_name2 data_type , ....... ) ;
    • Example,
    • CREATE TABLE Person   (
    • LastName varchar(30), FirstName varchar, Address varchar, Age int(3)   ) ;
    • Create Table tbldemo
    • ( Name text(30),
    • Age integer,
    • Gender text(1)
    • );
    • Data type depends on the Database management software you are using
  • SQL ALTER TABLE
    • ALTER TABLE table_name ADD COLUMN _name datatype
    • ALTER TABLE table_name DROP COLUMN column_name
    • Example,
    • ALTER TABLE tbldemo ADD COLUMN date_of_birth datetime
    • ALTER TABLE tbldemo DROP COLUMN marks;
  • SQL INSERT
    • INSERT INTO table_name VALUES (value1, value2,....)
    • INSERT INTO table_name (column_name1,column_name2,...) VALUES (value1, value2,....)
    • Example,
    • INSERT INTO tbldemo VALUES ( 'Amit', 22, 'm', #8/22/1982#, 27474017 ) ;
    • INSERT INTO tbldemo ( Name, Age, Gender, date_of_birth )
    • VALUES ('Preeti', 22, 'f', #2/18/1982#);
  • SQL SELECT
    • SELECT column_name(s) FROM table_name
    • SELECT * FROM table_name
    • SELECT * INTO new_table_name FROM original_table_name
    • SELECT column_name(s) FROM table_name WHERE condition
    • Example,
    • SELECT Name FROM tbldemo WHERE GENDER='f';
  • SQL UPDATE
    • UPDATE table_name SET column_name=new_value [, column_name=new_value] WHERE column_name=some_value ;
    • Example,
    • UPDATE tbldemo SET phone_no = 22523250 WHERE name='ShriRam';
  • SQL DELETE
    • DELETE FROM table_name WHERE condition
    • DELETE FROM table_name ( Note: Deletes the entire table!!)
    • Example,
    • DELETE FROM tbldemo WHERE Gender='f';
  • SQL DROP TABLE
    • DROP TABLE table_name
    • Example,
    • DROP TABLE tbldemo;
  • More SQL…
    • http://www.w3schools.com/sql/default.asp
    • http://w3.one.net/~jhoffman/sqltut.htm