Monday, 9 January 2012

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 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,

Sunday, 8 January 2012

Google Chrome - Shortcuts





The shortcuts for Google Chrome browser. This will save your  lots of time.
Action/Function
Shortcut


Open a new window
Ctrl + N
Open a new windows in incognito mode
Ctrl + Shift + N
Open link in a new tab
Ctrl + Click on link
Open link in new window
Shift + Click on link
Close current window
Alt + F4
Open a new tab
Ctrl + T
Reopen the last tab you’ve closed1
Ctrl + Shift + T
Switch to the tab at the specified position
Ctrl + 1 through Ctrl + 8
Switch to the last tab
Ctrl + 9
Switch to the next tab
Ctrl + Tab or Ctrl + PgDown
Switch to the previous tab
Ctrl + Shift + Tab or Ctrl + PgUp
Go to the previous page in your browsing history for the tab
Backspace, or press Alt + Left Arrow
Go to the next page in your browsing history for the tab
Shift + Backspace, or press Alt + Right Arrow
Close current tab or pop-up
Ctrl + W or Ctrl + F4
Open your homepage
Alt + Home
Open a file from your computer in Google Chrome
Ctrl + O, then select file
1 Google Chrome remembers the last 10 tabs that you’ve closed
Action/Function
Shortcut


Add ‘www.’ and ‘.com’ to your input in the address bar and open the web address
Type the part of the web address that’s between ‘www.’ and ‘.com’, then press Ctrl + Enter
Highlight content in the web address area
F6 or Ctrl + L or Alt + D
Open your web address in a new tab
Type a web address, then press Alt + Enter
Places a ‘?’ in the address bar. Type a search term after the ‘?’ to perform a search using your default search engine.
Ctrl + K or Ctrl + E
Jump to the previous word in the address bar
Place your cursor in the address bar, the press Ctrl + Left Arrow
Jump to the next word in the address bar
Place your cursor in the address bar, then press Ctrl + Right Arrow
Delete the previous word in the address bar
Place your cursor in the address bar, then press Ctrl + Backspace
Action/Function
Shortcut


Toggle bookmarks bar on and off
Ctrl + B
View the History page
Ctrl + H
View the Downloads page
Ctrl + J
View the Task Manager
Shift + Esc
Action/Function
Shortcut


Print your current page
Ctrl + P
Reload current page
F5
Stop page loading
Esc
Reload current page, ignoring cached content
Ctrl + F5 or Shift + F5
Scroll down the web page
Space bar
Go to the top of the page
Home
Go to the bottom of the page
End
Download link
Press Alt, then click the link
Open find-in-page box
Ctrl + F
Find next match for your input in the find-in-page box
Ctrl + G or F3
Find previous match for your input in the find-in-page box
Ctrl + Shift + G or Shift + F3
View source
Ctrl + U
Bookmark your current webpage
Ctrl + D
Make text larger
Ctrl + +
Make text smaller
Ctrl + -
Return to normal text size
Ctrl + 0
Action/Function
Shortcut


Copy content to the clipboard
Highlight content, then press Ctrl + C
Paste current content from the clipboard
Place your cursor in a text field, then press Ctrl + V or Shift + Insert
Delete the content and copy it to the clipboard (cut)
Highlight the content in a text field, then press Ctrl + X or Shift + Delete