Hi! Welcome to satish24k - It's Not Just Central Government Employeees News, but We Strive To Present You Whatever You Might Be Interested In.......................Chief Editor - kavitaSatish, Just a COMMON MAN with UNCOMMON DREAMS.......... LIFE IS NOT WHAT WE GET FROM BIRTH, IT IS WHAT WE MAKE OUT OF EVERY MOMENT WE LIVE; SO MAKE BEST OUT OF IT.......HAVE A GREAT LIFE

Wednesday, January 18, 2012

SQL Basic Information


With just a dozen commands and functions, a developer is able to perform most activities related to querying and manipulating a database.
Commands  like  Select , insert , delete  , update , create   
Function  like   Sum ()  Avg ()  Max()  , Min() Count()
The SQL declarations, or commands, are divided into two main categories: DDL and DML
DDL, or data definition language, is the part of SQL used to define the data and objects in a database. When these commands are used, entries are made in a data dictionary in the SQL server. Following are some DDL commands:
Create Table-, Create  Index , Alter Table, Drop Table, Drop Index
DML, the language for manipulating data, is the part of SQL used to recover or manipulate data. Its commands are responsible for the queries and changes made to tables. These are some of the most important commands in this category:
Select , insert  ,  update  rollback
Data  Type  in SQL
Char
Character data type with fixed size of up to 254 characters.
Date
Stores only the date.
Datetime or Timestamp
When part of the input argument is omitted, SQLBase assumes the default 0, which converts the date to 30/12/1899 and 12:00 a.m.
Decimal or Dec
Supports up to 15 digits (999999999999999 to +999999999999999). If nothing is specified, the precision 5 and scale 0 are assumed.
Double precision
Numeric data type of floating-point and double precision.
Float
When the precision is between 1 and 21, the data type will have simple precision. Between 22 and 53, the precision is double.
Integer or Int
An integer data type with precision of up to 10 digits (2,147,483,648 up to + 2,147,483,647).
Long Varchar
Stores characters or binary objects. This is equivalent to the data type blob.
Number
This is a super set from other data types. It supports precision of up to 22 digits.
Real
Numeric data type of floating-point and simple precision.
Smallint
This data type has no fractional digits. The digits to the right of the decimal point are truncated. You can have precision of up to five digits (from 32,768 to +32,767).
Time
Stores only the hour.
Varchar
Character data type with fixed size of up to 254 characters.

Select command is the essence of the SQL language
Basic syntax:
SELECT [*] [ALL | DISTINCT]
[name =] expression
[expression [AS name]]
FROM [correlation_name]
WHERE
[GROUP BY ] ]
[HAVING ]
[ORDER BY [ASC] [DESC]] ]

Selects all the columns in a
table.

ALL
The default in a SELECT command is to recover all the rows.
DISTINCT
Does not show duplicated rows.
expression
A selection list of expressions separated by commas. An expression can be a column name, a constant, a checked variable, the result of a function, or a system keyword.
FROM
Contains the names of the tables or views resulting in a set of rows.
correlation_name
A related name can be used to designate a preceding table or view.
WHERE
Specifies a search condition for the basic tables or views. The search condition cannot contain aggregate functions.
GROUP BY
This clause groups the resulting rows of a query, according to the column names. When the column by which the grouping occurs is an expression with more than one column, you must specify the number that indicates its relative position in the selection list.
HAVING
This clause allows you to establish a search condition with a group of rows resulting from a GROUP BY clause or by grouped columns.
ORDER BY
Specifies the order of rows in a result table. The rows can be ordered by more than one column. When the order column is derived from a function or arithmetic expression, the column must be specified by an integer that indicates the relative number of its position in the SELECT command. Optionally, ASC or DESC, indicating the ascending or descending order, can follow each column name or number.

Instead of showing all the columns, you can request a list of specific columns
This list must contain the names of the columns separated by commas. The order of the columns is not important. The code below selects the columns containing the first name, last name, and telephone number of each author.

SELECT au_fname, au_lname, phone FROM authors;
Share and Care
 For Latest Updates Always Visit http://satish24k.blogspot.com/
Print Friendly and PDFPrintPrint Friendly and PDFPDF


For Further Reading,
POSTAL TECHNOLOGY, TECHNOLOGY, TECHNOLOGY TIPS

0 comments:

By Blog Gadgets

Choose Your Subject

2013 WALLPAPERS 7th Pay Commission AADHAR ACCOUNTS AIPEU AIR INDIA AIRF AIRTRAVEL ALLOWANCES AMAGING AMAZING ANNA HAZARE ANOMALY ANTI CORRUPTION MOVEMENT AUTISM BABIES BANKING BIRDS WALLPAPERS BLOGGING BONUS BSNL BUDGET Cadre Restructure Calenders CANCER CASUAL LABOURS CAT CAT Orders CBSE CCL CCS CCS PENSION CCS(JT) Rules 1979 CGHS CHARTS CHILD CARE Child Care Allowance CHILDREN EDUCATION ALLOWANCE CHINA CIRCULARS Compassionate Appointment CONSUMER NEWS Conveyance Allowance Court Orders CPWD CREATIVITY CRICKET. SPORTS WALLPAPERS CSD CSS CVC Cycle Maintenance Allowance DA DA MERGER DEFENCE DEFENSE DIGITAL INDIA DIGITAL LIFE CERTIFICATE DISABLED DOPT DOWNLOAD DPE DRDO eCards ECHS EDUCATION eMO EMPLOYEES NEWS EMPLOYMENT NEWS ENTERTAINMENT EPFO ESTATES EX SERVICEMEN EXAMINATIONS FACEBOOK FAQs FDI FESTIVALS FIGHT FOR JUSTICE FINANCE BILL 2013 FINMIN FLOWERS FORMs FUNNY PICTURES g GADGETS Ganesha Wallpapers GDS GENERAL KNOWLEDGE GENERAL KNOWLEDGE - CURRENT AFFAIRS GOD WALLPAPERS GPF GREETINGS Group B HBA HEALTH HIGH DEFINITION WALLPAPER HOLIDAYS Hostel Subsidy Allowance HRA IAS IBA IDA INCOME TAX INCREMENT INDEPENDENCE DAY INDEX NUMBERS INDIA INSURANCE INVESTMENT IP/ASP IPO Exam ISLAM JOINING TIME KIDS KVS LATEST POSTAL NEWS Latest Releases from PIB LEAVE LOKAYUKTA LOVE LTC MACPS MAKE IN INDIA MEDICAL Meghdoot Millennium MHA MOBILE BANKING MOBILE WALLPAPERS MOF MOTHER MY CORNER NATURE WALLPAPERS NEGATIVE LIST NEWS NPS One Rank One Pension ORDERS ORDINANCE PARLIAMENT NEWS PENSION People you must know PERSMIN PERSONALITY DEVELOPMENT PERSONOLITY DEVELOPMENT PFRDA POLITICS POSTAL TECHNOLOGY Postings PPF Promotions QUESTION PAPERS QUOTES RAILWAY NEWS RAJYASABHA NEWS RBI RECRUITMENT REIMBURSEMENT RELIGION REPUBLIC DAY RESERVATION RESULTS Retirement Age RTI SANATANA DHARMA Sanchaya Post SAPOST SBCO SC SCIENCE SCOVA SECULAR SEXUAL HARASSMENT SKIN CARE SLEEP SMS SMS-GOODNIGHT SPEEDNET ST Study Material TATKAL TEACHERS TECHNOLOGY TECHNOLOGY TIPS TERRORISM TRANSFER TRAVEL Travelling Allowance Troubleshooting Problems in Postal Applications UNION NEWS UPSC VIDEOS Virus Wallpapers Washing Allowance WILD PHOTOGRAPHY WOMAN ಕನ್ನಡಿಗ

Popular Posts of the Month

All Time Popular Posts

 
Blogger Wordpress Gadgets