Some basic information about SQL

SQL ESSENTIALS With just a dozen commands and functions, a developer is able to perform most activities related to querying and manipul...


SQL ESSENTIALS

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;
Collected and prepared by S Jayachandran,

COMMENTS

BLOGGER
Name

Achievements,5,Allowances,87,Amendments,3,Android Apk,3,Announcements,38,anomalies,3,Articles,30,ATM,1,Audio / Video,3,Awards,7,Awareness,3,Banking,44,Books,3,Branch Post Office,2,BSNL,35,Business,15,Cadre Restructuring,10,CAT,4,CBS,2,CBS-CTS,1,CCA,5,CCA MCQ,1,CCS Rules,12,CEA,8,CGHS,56,Clarifications,27,COD,1,Competitive Exams,15,Computer Guidelines,119,Corona / Covid-19,32,Court News,35,Customer Care,247,Defence,1,Deputation,2,Differently Abled,7,DOP News,167,DOP Orders,99,DOPT Orders,331,Drivers,5,Dte Orders,58,e-Services,29,Education,117,Elections,3,Employees News,868,Employment News,85,Entertainments,60,Events,48,Exam / Result,112,Exam / Syllabus,58,Exam News,17,Facts,3,FAQ,78,Finacle,14,Finmin Orders,8,For System Administrators,128,Forms,15,FR Quiz,5,Frauds,1,Gazette,2,GDS,43,GenEng,1,General Informations,167,General Knowledge,344,GFR,3,GK,7,GO,1,GOVT Orders,50,GPF,1,Greetings,17,Guidelines,19,Hardwares,9,HBA,9,Health Tips,38,Holiday Home,18,Holidays List,6,Honorarium / Incentives,10,Important Letters,3,Important Persons,2,Income Tax,56,Instructions,3,Interest Rate,14,Internet Tips,94,IPO,191,Judgement,19,KV Schools,13,Labour News,2,Latest Software Updates,76,LAW,15,Leave Rules,44,Letter to Dte,1,Lokpal and Lokayuktas,1,LTC,41,MA Rules,5,MACP,26,Mails,24,MCQ,1,MHA Orders,2,Miscellaneous,4,MMS,18,Mobile Tips,33,National Pension System (NPS),51,NEFT / RTGS,2,Network Trouble shooting,11,News,179,Notifications,13,OBC related,1,Operating Procedures,15,Pay & Allowances,2,Pay Commission,45,Pay Commission - 7th,34,Pay Fixation,7,Pension,144,Pensioners News,11,Persmin,35,Philately,27,PLI,1,PLI and RPLI,32,POGuide I,5,PointOfSale,4,POSB,57,POSB Clarifications,13,Postal Accounts & Finance,1,Postal Accouunts / PAO,1,Postal Exams,4,Postal Informations,150,Postal Manuals,3,Postal Savings Schemes,61,PostalHistory,2,Printer Trouble shooting,11,Printing Tips,15,Project Arrow,6,Promotions,10,Questions / Answers,51,Quiz,34,Railway,110,Rajya Sabha Q&A,1,Random,6,Recovery Tips,12,Recruitment Rules,6,Registry Tips,26,Registry Tools,11,Reimbursement,7,Reservation,2,Results,1,RICT,2,RMS,15,Rotational Transfer,2,RTI,18,Rulings,63,SanchayPost,111,SAP,1,Savings Scheme,18,SB Orders,310,SBCO,29,SBOrder2017,1,SBOrder2018,1,SBOrder2020,1,SBOrder2021,6,SBOrder2022,2,Security Guidelines,23,Security Tips,46,Seniority List,1,Software Tips,11,Softwares,24,Speed Post,1,Sports,5,SQL,49,Staffs and Welfare,200,State News,19,Stories,5,Students,4,Study Materials,186,Sukanya Samriddhi Account,7,Tax,5,Technology,29,Technology News,23,TET / TRB / TNPSC,14,Tips and Tricks,111,TN - தமிழ்நாடு,33,Tools,30,Training,32,Transfer / Postings,38,Trouble shooting,25,UnCategorized,4,Union News,90,Update,93,Useful Softwares,125,Utilities,64,Virus Solutions,23,Websites,53,Welfare,1,windows 7,12,Windows Server,10,Windows Tips,152,Windows Vista,5,
ltr
item
Postal RADAR: Some basic information about SQL
Some basic information about SQL
Postal RADAR
https://www.postalradar.com/2012/01/some-basic-information-about-sql.html
https://www.postalradar.com/
https://www.postalradar.com/
https://www.postalradar.com/2012/01/some-basic-information-about-sql.html
true
5719657340864375059
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content