Introduction to SQL - Tutorial for beginners to databases. PART 1



How to Use SQL

SQL stands for Structured Query Language and was originally developed by IBM in the 70s to interact with relational databases. It is the common language for databases, remains fairly readable and it is relatively simple to learn the basics (although the language can be very powerful).

Steps

  1. 'SQL' is usually pronounced 'S-Q-L'(Structured Query Language).SQL was initially developed at IBM by Donald D. Chamberlin and Raymond F. Boyce in the early 1970s. This version was called SEQUEL (Structured English Query Language).
  2. There are various dialects of SQL but most widely used database engines today adhere to the SQL99 standard from ANSI, and many vendors have implemented extra features to extend that standard (the Microsoft 'flavor' of SQL is called T-SQL or Transact-SQL, the Oracle version is PL/SQL).
  3. Getting the Data Out!This is what it usually is all about. For this we use the SELECT statement; it will query or retrieve data from an SQL database.
  4. A simple example would be something like:'select * from tblMyCDList' which would get all columns (that's where the * comes in) and rows in the table 'tblMyCDList'.
  5. Queries are usually much more complicated than this.The select can be used to tease out particular columns and rows out of a table and even link data from multiple tables or, for that matter, databases together.
  6. If we want to filter the rows returned by the select statement, a where clause is needed to qualify the record sets returned.'select * from tblMyCDList where CDid = 27' will retrieve the rows where the field CDid is equal to 27. Or 'select * from tblAttribute where strCDName like 'Dark Side%' ' uses a wild card representing zero or more instances of any character and will hopefully show that my collection does have my favorite Pink Floyd album.
  7. INSERT and UPDATE statements are used to add and change data in an SQL database (check the links below for some excellent tutorials that can take you further).
  8. The DELETE statement is used to remove data from an SQL database.

Community Q&A

Search
  • Question
    If the ename starts with s(suresh) and I use s%, what is the use of %? How do I use it and where?
    wikiHow Contributor
    Community Answer
    The % sign acts as a wildcard for any amount of characters. When used after a specific letter (like "s%" in your example), it will return any value that begins with "s." When used at the beginning (%s), it will return any value ending with "s." When used on both sides (%s%), it will return any value containing "s."
    Thanks!
  • Question
    Where, when, and how are SQL used?
    wikiHow Contributor
    Community Answer
    The acronym is structured query language. It's used to ask a relational database for certain records based on a set of criteria. It also creates and changes records in relational database.
    Thanks!
  • Question
    How will I ask SQL to give me a part number for a certain car by make, model year?
    Community Answer
    If your field name is part_name for example, then your query goes like this if you want to select by the make: select part_name from [table_name] where make = [condition]. If you want to select with model year, it goes like this: select part_name from [table_name] where model_year = [condition]. If you want both use this: select part_name from [table_name] where make = [condition] or select part_name from [table_name] where model_year = [condition].
    Thanks!
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.

Video

  • The following book may be helpful: Kline, Kevin, Daniel Kline and Brand Hunt. 2001. SQL in a Nutshell. 2nd Edition. O’Reilly & Associates, Inc.
  • It is very easy to attach to SQL databases from within Microsoft Access (it's query tool can be used in SQL mode although the syntax has differences from that used with SQL Server and other databases).
  • Under Linux, the most popular databases are likely MySQL and PostgreSQL. If the console seems not convenient, use ExecuteQuery or some other similar open source tool.
  • Use wamp or xampp an easier web server with phpmyadmin (mysql)
  • Microsoft Query is a tool that comes with Windows – it has graphical or SQL query modes.

Warnings

  • A relational database usually means 'a system whose users view data as a collection of tables related to each other through common data values' that is usually implemented as a 'relational database management system' (RDBMS) like MySQL, Sybase, SQL Server or Oracle. Strict relational database systems follow E.F. ‘Ted’ Codd’s 'Twelve Principles of Relational Databases'. It can be argued (and often is) that Access is also a relational database, Microsoft certainly says it is, but the way the engine is built actually makes it an 'Indexed Sequential Access Method (ISAM)' database or a flat file database. The differences are not easy to spot on the surface because they aren’t there, Access even has it’s own implementation of SQL, but rather they are down in the database engine’s guts (see for a good description of this). All other things equal, certain complicated queries in Access will run much slower than in SQL Server. Certain simple queries will run slower in SQL Server.
  • The meaning of 'database' can often be confused; it can be used to talk about the actual container for a set of tables, like a CD collection database or the Master database. The actual server software that includes the database is the 'database engine' or the 'database software' that can contain databases. Examples are SQL Server 2005 Express, MySQL or Access 2003.

Related wikiHows

Article Info

Categories:

In other languages:

Español: , Italiano: , Português: , Русский: , Deutsch: , Français: 

Thanks to all authors for creating a page that has been read 143,292 times.





Video: What is Database & SQL?

How to Use SQL
How to Use SQL images

2019 year
2019 year - How to Use SQL pictures

How to Use SQL forecast
How to Use SQL advise photo

How to Use SQL foto
How to Use SQL picture

How to Use SQL How to Use SQL new images
How to Use SQL new images

pics How to Use SQL
pics How to Use SQL

Watch How to Use SQL video
Watch How to Use SQL video

Forum on this topic: How to Use SQL, how-to-use-sql/
Communication on this topic: How to Use SQL, how-to-use-sql/ , how-to-use-sql/

Related News


Have a Healthier Sex Life With Rheumatoid Arthritis
Editor Face-Off: Is Kendall Jenner an Amazing Model or an Overrated FashionStunt
Hashtag Like: The Nike Sneakers Taking Over Social Media
How to Deal with Resistance from Family and Friends When You Become a Vegan (for Teens)
Sugar Me Smooth Kit Review
How to Do a Manicure at Home
How Having Narcolepsy Affects Going to School and Learning
9 Attitude Adjustments for a Happier Life
9 High-Profile Athletes With Atrial Fibrillation
Osteoporosis: Risk Factors, Treatment, Diet, and Exercise
T.I For Men Clothing: AW13 Collection



Date: 06.12.2018, 07:56 / Views: 45334