Thursday, November 11, 2021

Greate Android App for earning 12% intrest on Investment

 

Fintech company gives lot’s of opportunity to get return more as compare to FDs and traditional investment. Here I am discussing on App which provide 12% interest rate on investment which is pear to pear lending/investment.  Application link is shared bellow.

https://twelveclub.onelink.me/2Cmd/609beaaa

Generally, Equity gives 15 to 20 % return yearly on long term probably 2 to 3 year or more. Ware as FD’s and Recurring FD’s are give 4.5 to 6 % return as of now. But some Fintech company gives 7 to 10 % with locking period about 2 to 3 year. Even corporate bond, PPF, EPF etc gives return around 8 to 10%

Peer-to-peer lending, also abbreviated as P2P lending, is the practice of lending money to individuals or businesses through online services that match lenders with borrowers. Peer-to-peer lending companies often offer their services online, and attempt to operate with lower overhead and provide their services more cheaply than traditional financial institutions.[citation needed] As a result, lenders can earn higher returns compared to savings and investment products offered by banks, while borrowers can borrow money at lower interest rates, even after the P2P lending company has taken a fee for providing the match-making platform and credit checking the borrower. There is the risk of the borrower defaulting on the loans taken out from peer-lending websites.

12% Club, powered by BharatPe and in partnership with RBI approved NBFCs offers you a solution for all your investment and borrowing needs

Invest @12%
- Invest money anytime and start earning interest daily
- Start investing from as low as Rs. 1,000
- Get upto 12% interest per annum (Interest is accrued daily)
- Request withdrawal anytime, no withdrawal charges
- In partnership with RBI approved NBFC (LendenClub: Innofin Solutions Private Limited and Liquiloans: NDX P2P Private Limited )

Borrow @12%
- Borrow money anytime @12% interest
- Repay anytime, no prepayment charges
- Zero processing fees
- Partnered with RBI approved NBFC (Mufin Finance: Hindon Mercantile Limited)

Here I AM SHARING REFERAL LINK FROM WHICH YOU CAN EARN 12% INTREST YEARLY NOT LOKINPREIOD AND INTREST CREDITED DAILY. ANY TIME YOU CAN WIDHRAW MONEY AND MOST IMPORTANT PART IS AMOUNT CREDITED WITHIN 1 OR 2 MIN IN YOUR ACCOUNT.

https://twelveclub.onelink.me/2Cmd/609beaaa


Reference:

1) wikipedia

https://en.wikipedia.org/wiki/Peer-to-peer_lending

2) 12% club app

https://twelveclub.onelink.me/2Cmd/609beaaa

 

Sunday, August 30, 2020

Learning Benefits of Abacus

 


We all know what abacus is, having learned and used when we were young. If you are thinking of enrolling your child for abacus classes, then you must know the benefits it has on the overall development of children. Apart from improving the ability to calculate, it is beneficial in other areas too.

We all want our kids to be more successful than us and we all work hard toward achieving that goal. We send them to the best schools, hire the best tutors, and even reserve our best for them.

Early childhood is the most crucial growing phase in terms of emotional, intellectual, physical and social development. While some children learn better through reading, some others learn better by observing. No child is the same. While we all know by now that that human brain growth reaches its peak in early childhood, it’s also known that the capacity to process information varies with children.

That brings us to the question: Do kids enjoy learning? The answer depends on who you ask.  Some children take to learning as a fish takes to water, some struggle, but the fact is children need to study. And one of the best ways to get them interested in learning is through an abacus.

Concentration

While learning abacus, children not only learn to do calculations like addition, subtraction, multiplication, and division on the abacus device but also learn to do mental calculations. This technique, called Visualisation, practically means assuming abacus within the mind and performing virtual calculations. As the calculations are done in the mind, it improves concentration levels, both for abacus and general studies. When the child learns to concentrate, he/she also learns to focus on specific problems, whether at home or school.

Improves Logical Understanding

After a while when the child has become perfect at using the abacus, his/her understanding of the world changes. They now start thinking from a logical perspective. They use logic for day-to-day scenarios.

Mathematical Proficiency

Although interesting when learned correctly, most students consider mathematics to be a difficult subject. Learning abacus makes it easy for students to master mathematics leading to a better understanding of the subject as well as becoming proficient in all aspects.

Analytical Skills

When children solve mathematical problems through abacus, they build their analytical skills. For eg, when children use the abacus, they learn to solve the same problem with several different yet simple formulas. This makes the child analyze the usage of the correct formula instantly and use that in solving the problem. With this, the child also starts to analyze real-life situations.

Memory Retention

One of the greatest properties of the abacus is it helps in memory retention. To solve a mathematical problem, a child needs to remember all the steps. With all the steps that a child uses to solve a problem using the abacus, he/she needs to know the steps and this helps them retain knowledge—both directly and indirectly. By practicing abacus continuously, the child subconsciously memorizes the question, steps, and answers which in turn boosts his/her memory.

Enhances Gross Motor Skills

When the child uses his/her hand to move the beads of the abacus instrument around, their brain is getting stimulated.  Abacus not only helps in improving brain efficiency but also simulates the sensory organs too.

Reduces Stress

Abacus is seen as a great stress buster and is known to boost happiness. Abacus helps in stimulating the brain which in turn can break the anxiety levels.

Improves Learning Fundamentals

Students remember better if teaching is done with the help of an object or image. For instance, take the example of a skeleton or maps or charts, children learn more from these objects or images than textbooks. Similarly, if children need to enjoy math, it should be taught with the help of an instrument—abacus in this case.

The benefits mentioned here are just a few of the many that one can imagine about abacus. The popularity of abacus has been on the rise constantly and many schools today dedicate some hours each month to teach children abacus. Abacus, along with Vedic mathematics, has become so popular that parents choose places that teach both these.

The right age to start teaching your child abacus is 4 years and over. That’s because this is the age when their brain starts processing information in the right way and they understand how to move the beads to get to the right solution.

Application developed by me on play store for learing Abacus

https://play.google.com/store/apps/details?id=com.onezero.simpleAbacus


Thursday, March 23, 2017

Glide



  • Glide is a fast and efficient open source media management framework for Android that wraps media decoding, memory and disk caching, and resource pooling into a simple and easy to use interface.
  • supports fetching, decoding, and displaying video stills, images, and animated GIFs.
  • By default Glide uses a custom HttpUrlConnection based stack, but also includes utility libraries plug in to Google's Volley project or Square's OkHttp library instead.
  • primary focus is on making scrolling any kind of a list of images as smooth and fast as possible, but Glide is also effective for almost any case where you need to fetch, resize, and display a remote image.
  • You can download a jar from GitHub's releases page.

Or use Gradle:
repositories {
  mavenCentral()
}

dependencies {
    compile 'com.github.bumptech.glide:glide:3.4.+'
    compile 'com.android.support:support-v4:19.1.0'
}

How do I use Glide?

// For a simple view:
@Override
public void onCreate(Bundle savedInstanceState) {
    ...

    ImageView imageView = (ImageView) findViewById(R.id.my_image_view);

    Glide.with(this).load("http://goo.gl/h8qOq7").into(imageView);
}

// For a list:
@Override
public View getView(int position, View recycled, ViewGroup container) {
    final ImageView myImageView;
    if (recycled == null) {
        myImageView = (ImageView) inflater.inflate(R.layout.my_image_view,
                container, false);
    } else {
        myImageView = (ImageView) recycled;
    }

    String url = myUrls.get(position);

    Glide.with(myFragment)
        .load(url)
        .centerCrop()
        .placeholder(R.drawable.loading_spinner)
        .crossFade()
        .into(myImageView);

    return myImageView;
}

Refrences 




Run an Android App against a localhost API

Using the Emulator

The bad news first: this solution only work with the emulator and not with your actual devices. So start up your emulator (since it could take a while until it is ready). Start your server at localhost and attach the debugger. Next, change the API endpoints in your Android code to http://10.0.2.2. This reroutes the requests from your emulator to your computer’s localhost. Run the Android app on the emulator and cause the requests you want to debug. This should enable you to catch the incoming request on the localhost server. In my case, this quickly resolved my issue.
Obviously, the use of this method is not limited to debugging. If you are on the train and have no Internet connection, you can use this approach to develop your app anyway. One last tip: if you use GenyMotion as your emulator, use http://10.0.3.2 as the localhost rerouting address.

Using a Device

A different approach is necessary when you want to avoid using the emulator. However, this solution requires you to be on the same Wi-Fi network. Change the API request endpoint to your computer's local IP address, e.g. http://192.168.0.142 and run the app on your device. Once again, all requests should go against the localhost server running on your computer.


Wednesday, December 14, 2016

Essential Android Interview Questions-2

Hello Friends  here are some Interview Question I prepare during my interview.

1) Activity life cycle- Can I save all my database updates in onStop()?
Ans.: No because onStop() may not be called in some situations.

In case of low memory or configuration changes, there is a chance that android may force-kill your applications befor reaching onStop(). onPause() is the only function that will be called with out fail before killing the application. so save all persistent data like DB tables in onPause() only.
We can't save all database table in onSaveInstanceState because that function will not be called if user presses back button.

2) What is the difference between 'this' and 'getapplicationcontext'?
Ans. : 'this' points to current context. 'getapplicationcontext' point to entire process. If your context is of entire life time of process then use 'app context' else 'this'.
If you want to use some control whose life time is through out your application life time then go for 'app context', else use 'this' pointer(activity context).

3) What is the UI response time limit in android?
Ans. 5sec
If user touches your activity and if your program doesn't respond to user events within 5 seconds, android will not tolerate it and it force closes your application this error is called as ANR(Application Not Responding).

4) What is ANR(Application Not Responding)? What is the reason for this problem and what is the solution for that problem?
Ans. ANR- will occur if we are doing any other heavy functionality along with UI in single Main Thread. If two heavy functionalities happen in single thread. it will delay response to user actions, which may irritate user, and hence stop your process.
Solution- Run only UI components in Main Thread.

5) What is Bundle? What dose it contain in onCreate() of your activity?
Ans. Bundle contain previous savedinstancestate.
 Bundle is a data holder, which holds data to be passed between activites. In case of forceful closing of an activity. android will save all its UI states and transient states so that they can be used to restore the activity's states later. This saved states will be passed via Bundle in onCreate() function to store its states once android recreates a killed activity.
This will happen in case of low memory or configuration changes like rotating the phone.

onSaveInstanceState():
This function will be called by a Android before onPause() or after onPause(). If Android is forcefully killing your acclivity. In this function we have to save all your activity states.

onRestoreInstanceState():
This function will be called after onStart()

6) How serializable differ from parcel?
Ans. Parcel is not a general-purpose serialization mechanism. This class is designed as a high-performance IPC transport. used heavitly in Binders. for normal serialization concepts, use serializable . since serializable are heavy and takes time. we use Parcels for IPC in embeded devices.

7) How to analyze android application crash, how to fix crash using logcat?
Ans. after crash logcat will contain file name, exception name along with line number where it has crashed.

8) What is a singleton Class?
Ans. A class for which we can create only one object is called as singleton class.

9) How to create a singleton class in Java?
Ans. Singleton class means a class for which only one object exists. It is impossible to create multiple objects for a singleton class.It is a design pattern.

To create a singleton class:
Don't expose public constructors from your class. Because  if constructor is public, then any one can create object for your class. Then use public static method to create an object for your class and return it. If clients want object for your class then they can call this public static method directly with class name.
Note: Make sure that you are creating object only once in this static method.

eg.
public class MySingleTon{

       private static MySingleTon myObj;
      /**
       * Create private constructor
      */
      private MySingleTon(){
      }
       /**
       * Create a static method to get instance.
      */
      public static MySingleTon getInstance(){
               if(myObj==null){
                        myObj=new MySingleTon();
               }
               return myObj;
      }
     public void getSomeThing(){
     //do something here
     System.out.println("I am here...");
    }
 
    public static void main(String args[])
    {
         MySingleTon st=MySingleTon.getInstance();
         st.getSomeThing();
     }
}

10) What is sleep mode in android? What will happen to CPU once screen(LCD) light goes off?
Ans. Sleep mode-means CPU will be sleeping and will not accept any command except from RIL(Radio Interface Layer) and alarms. CPU will go to sleep mode with in fracton of seconds after LCD is turned off.

There is small difference in power consumption when you compare a phone with laptops.
Laptops most of the time runs on direct power through charger(Mostly we carry charge with laptop).
Mobiles mostly run on battery power(Rarely we carry charger with us) by kepping this in mind. android has designed in a such a way that phone will not consume battery power if user is not interacting with the phone. This is to increase battery back up time for user.
Thats why when LCD screen power is off(that means user is not interacting with phone) within fraction of seconds CPU will also go to a mode(sleep mode) where it does minimal work and saves battery power. When CPU is in sleep mode. it accepts commands only from RIL(radio interface layer) which is basically sms and call functions and alarms. Other than this CPU will stop executing other applications functions.
Note: If any application wants CPU time for its emergency work when CPU is in sleep mode. then it can request CPU time by using WAKE LOCKS.
For eg. MP3 application has to keep playing songs in its service, even though user has turned off LCD screen. That means MP3 application's service has requested CPU time by using WAKE LOCKS.

11) What is a fragment in android?
Ans. Fragment is a part of an activity, which contributes its own UI to that activity. Fragment can be thought like a sub activity.
Fragment are used to efficiently use the space in wider screen devices.
An activity may contain zero or multiple number of fragments based on the screen size. A fragment can be reused in multiple activities, so it acts like a reusable component in activities.

12) What is the difference between activity and fragment in android?
Ans. Fragment is a part of an activity, which contributes its own UI to that activity. Fragment can be thought like a sub activity. Where as the complete screen with which user interface is called as activity. An activity can contain multiple fragments. Fragments are mostly a sub part of an activity.
An activity may contain zero or multiple number of fragments based on the screen size. A fragment can be reused in multiple activity so it acts like a reusable component is activities.
A fragment cannot exist independently. It should be always part of an activity. Where as activity can exist without any fragment in it.

13) What is the use of 9patch image compared to other images?
Ans. It will scale the images automatically based on the device screen sizes on which app is loaded.

14) |What is the maximum memory limit given for each process or application in android?
Ans. 16MB is the maximum memory limit given to any given android application. Some second generation phone will return 24Mb of memory for each process or even more.

15) Which kernel(operating system) is used in android?
Ans. linux
        Linux modified kernel(Monolithic) is used in Android.

16) How to get contact phone number from contacts application's content provider?
Ans. Use ContactsContents URI and CommonDataKinds Phone CONTENT_URI. then request it through content resolver

//First get the all basic details from basic table of contacts
Cursor c1=this.getContentResolver().query(ContactsContract.Contacts.CONTENT_URI,null,null,null,null);
c1.moveToNext();//move to first row

String id=c1.getString(c1.getColumnIndex(Contacts_ID));//get its id

//now based on that id, you can retrive phone details from other table
Cursor cur=this.getContentResolver().query(CommonDataKinds.Phone.CONTENT_URI,null,CommonDataKinds.Phone.CONTACT_ID+"=?",new String[]{id},,null);

cur.moveToNext();

String number=cur.getString(cur.getColumnIndex(CommonDataKinds.Phone.NUMBER)):

17) How to upgrade SQLite database of an android application, befor uploading the new version into play store?
Ans. Pass new version number for database to SQLiteOpenHelper() function Then update the database in onUpdate of SQLiteOpenHelper class.

If you want to upgrade the data base of your existing application, which is released into android play store, then follow bellow steps.

  • Create new version number for latest database
  • Based on some condition pass this latest version number to SQLiteOpenHelper constructor function.
  • then what ever the updations you want to make to database, do it in on Upgrade() of SQLiteOpenHelper class.  

18) What is the difference between intent, sticky intent, and pending inetent?
Ans. Intent- is a message passing mechanism between components of android except for content provider, sticky intent- Sticks with android, for future broad cast listeners; Pending Intent- Will be used when some one wants to fire an intent in future and may be at that time that app is not alive.

Sticky Intent- Sticks with android, for future broad cast listeners. For example if BATTERY_LOW event occures then that intent will be stick with an android so that if future user requested for BATTER_LOW, it will be fired.
Pending Intent- If you want some one to perform any Intent operation at future point of time on behalf of you, then we will use Pending Intent Eg. Booking a ticket at late night when your application is not running IN this scenario we will create a pending intent to start a service which can book tickets at late night and hand it over to Alarm Manager to fire it at that time.

19) What is the difference between service and a thread?
Ans. Service is a component of android, which runs in the background without any UI. By deault service will run in Main thread only.
Thread is not android component, but still one can use thread to do some background task. Using thread in place of service is discouraged.
Though conceptually both looks similar there are some crucial differentiation.

  • Service- If it is destroyed while performing its job, in the middle by Android due to low memory scenario.Then android will make sure that it will restart your service, if you have returned START_STICKY or START_DELIVER_INTENT from onStartCommand().
  • Thread- if it is destroyed by android in middle due to low memory, then android will not guarantee to restart it again. That means user lost his half work.
  • Service- is a component of android, so it has priority levels to be considered while destroying an application due to low memory. Thread- is not a component of android, so android will not take thread priority into considerations while killing an application due to low memory.
I will to explain this 3rd point
Lets say you have a requirement of connecting to internet from your activity. You can do it by using a service(with thread) or directly by creating a thread in activity. Consider the second scenario where you are connecting to internet in a thread. Then
  1. What will happen if user closes the activity. while still thread is running in the background. Will that thread continue to run in back ground? Answer is you cannot really predict.
  2. Assume that in continuation for above scenario, even after killing activity your thread continued to do its intended operation. Then there is a low memory situation aries in your phone. Then this application will be the first susceptible app to be killed as there is no priority for this application.
  3.  so bottom line is If you want to do some heavy background functionality then it is always better to have a service with thread. If you fell that that background functionality to be alive as long as your activity is alive, then go for activity with thread or activity with async task. 

20) What is difference between thread and handler thread, in android?
Ans. Handler thread will have looper and MessageQueue, but looper is prepared to handle incoming message.
Handler thread is extended version of thread, where its looper will be prepared to handle incoming messages from other threads(inter thread communication) But for normal java thread, looper will be there but in pasive node, i.e not prepared for inter thread communication.









































Friday, November 25, 2016

HTML Tags Ordered Alphabetically

Here is HTML5 tag from http://www.w3schools.com/ and description.


Tag Description
<!--...--> Defines a comment
<!DOCTYPE>  Defines the document type
<a> Defines a hyperlink
<abbr> Defines an abbreviation or an acronym
<acronym> Not supported in HTML5. Use <abbr> instead.Defines an acronym
<address> Defines contact information for the author/owner of a document
<applet> Not supported in HTML5. Use <embed> or <object> instead.Defines an embedded applet
<area> Defines an area inside an image-map
<article> Defines an article
<aside> Defines content aside from the page content
<audio> Defines sound content
<b> Defines bold text
<base> Specifies the base URL/target for all relative URLs in a document
<basefont> Not supported in HTML5. Use CSS instead.Specifies a default color, size, and font for all text in a document
<bdi> Isolates a part of text that might be formatted in a different direction from other text outside it
<bdo> Overrides the current text direction
<big> Not supported in HTML5. Use CSS instead.Defines big text
<blockquote> Defines a section that is quoted from another source
<body> Defines the document's body
<br> Defines a single line break
<button> Defines a clickable button
<canvas> Used to draw graphics, on the fly, via scripting (usually JavaScript)
<caption> Defines a table caption
<center> Not supported in HTML5. Use CSS instead.Defines centered text
<cite> Defines the title of a work
<code> Defines a piece of computer code
<col> Specifies column properties for each column within a <colgroup> element 
<colgroup> Specifies a group of one or more columns in a table for formatting
<datalist> Specifies a list of pre-defined options for input controls
<dd> Defines a description/value of a term in a description list
<del> Defines text that has been deleted from a document
<details> Defines additional details that the user can view or hide
<dfn> Represents the defining instance of a term
<dialog> Defines a dialog box or window
<dir> Not supported in HTML5. Use <ul> instead.Defines a directory list
<div> Defines a section in a document
<dl> Defines a description list
<dt> Defines a term/name in a description list
<em> Defines emphasized text 
<embed> Defines a container for an external (non-HTML) application
<fieldset> Groups related elements in a form
<figcaption> Defines a caption for a <figure> element
<figure> Specifies self-contained content
<font> Not supported in HTML5. Use CSS instead.Defines font, color, and size for text
<footer> Defines a footer for a document or section
<form> Defines an HTML form for user input
<frame> Not supported in HTML5.Defines a window (a frame) in a frameset
<frameset> Not supported in HTML5.Defines a set of frames
<h1> to <h6> Defines HTML headings
<head> Defines information about the document
<header> Defines a header for a document or section
<hr> Defines a thematic change in the content
<html> Defines the root of an HTML document
<i> Defines a part of text in an alternate voice or mood
<iframe> Defines an inline frame
<img> Defines an image
<input> Defines an input control
<ins> Defines a text that has been inserted into a document
<kbd> Defines keyboard input
<keygen> Defines a key-pair generator field (for forms)
<label> Defines a label for an <input> element
<legend> Defines a caption for a <fieldset> element
<li> Defines a list item
<link> Defines the relationship between a document and an external resource (most used to link to style sheets)
<main> Specifies the main content of a document
<map> Defines a client-side image-map
<mark> Defines marked/highlighted text
<menu> Defines a list/menu of commands
<menuitem> Defines a command/menu item that the user can invoke from a popup menu
<meta> Defines metadata about an HTML document
<meter> Defines a scalar measurement within a known range (a gauge)
<nav> Defines navigation links
<noframes> Not supported in HTML5.Defines an alternate content for users that do not support frames
<noscript> Defines an alternate content for users that do not support client-side scripts
<object> Defines an embedded object
<ol> Defines an ordered list
<optgroup> Defines a group of related options in a drop-down list
<option> Defines an option in a drop-down list
<output> Defines the result of a calculation
<p> Defines a paragraph
<param> Defines a parameter for an object
<pre> Defines preformatted text
<progress> Represents the progress of a task
<q> Defines a short quotation
<rp> Defines what to show in browsers that do not support ruby annotations
<rt> Defines an explanation/pronunciation of characters (for East Asian typography)
<ruby> Defines a ruby annotation (for East Asian typography)
<s> Defines text that is no longer correct
<samp> Defines sample output from a computer program
<script> Defines a client-side script
<section> Defines a section in a document
<select> Defines a drop-down list
<small> Defines smaller text
<source> Defines multiple media resources for media elements (<video> and <audio>)
<span> Defines a section in a document
<strike> Not supported in HTML5. Use <del> or <s> instead.Defines strikethrough text
<strong> Defines important text
<style> Defines style information for a document
<sub> Defines subscripted text
<summary> Defines a visible heading for a <details> element
<sup> Defines superscripted text
<table> Defines a table
<tbody> Groups the body content in a table
<td> Defines a cell in a table
<textarea> Defines a multiline input control (text area)
<tfoot> Groups the footer content in a table
<th> Defines a header cell in a table
<thead> Groups the header content in a table
<time> Defines a date/time
<title> Defines a title for the document
<tr> Defines a row in a table
<track> Defines text tracks for media elements (<video> and <audio>)
<tt> Not supported in HTML5. Use CSS instead.Defines teletype text
<u> Defines text that should be stylistically different from normal text
<ul> Defines an unordered list
<var> Defines a variable
<video> Defines a video or movie
<wbr> Defines a possible line-break

Wednesday, November 16, 2016

SQL Quick Reference

SQL StatementSyntax
AND / ORSELECT column_name(s)
FROM table_name
WHERE condition
AND|OR condition
ALTER TABLEALTER TABLE table_name
ADD column_name datatype
or
ALTER TABLE table_name
DROP COLUMN column_name
AS (alias)SELECT column_name AS column_alias
FROM table_name
or
SELECT column_name
FROM table_name  AS table_alias
BETWEENSELECT column_name(s)
FROM table_name
WHERE column_name
BETWEEN value1 AND value2
CREATE DATABASECREATE DATABASE database_name
CREATE TABLECREATE TABLE table_name
(
column_name1 data_type,
column_name2 data_type,
column_name3 data_type,
...
)
CREATE INDEXCREATE INDEX index_name
ON table_name (column_name)
or
CREATE UNIQUE INDEX index_name
ON table_name (column_name)
CREATE VIEWCREATE VIEW view_name AS
SELECT column_name(s)
FROM table_name
WHERE condition
DELETEDELETE FROM table_name
WHERE some_column=some_value
or
DELETE FROM table_name
(Note: Deletes the entire table!!)
DELETE * FROM table_name
(Note: Deletes the entire table!!)
DROP DATABASEDROP DATABASE database_name
DROP INDEXDROP INDEX table_name.index_name (SQL Server)
DROP INDEX index_name ON table_name (MS Access)
DROP INDEX index_name (DB2/Oracle)
ALTER TABLE table_name
DROP INDEX index_name (MySQL)
DROP TABLEDROP TABLE table_name
EXISTSIF EXISTS (SELECT * FROM table_name WHERE id = ?)
BEGIN
--do what needs to be done if exists
END
ELSE
BEGIN
--do what needs to be done if not
END
GROUP BYSELECT column_name, aggregate_function(column_name)
FROM table_name
WHERE column_name operator value
GROUP BY column_name
HAVINGSELECT column_name, aggregate_function(column_name)
FROM table_name
WHERE column_name operator value
GROUP BY column_name
HAVING aggregate_function(column_name) operator value
INSELECT column_name(s)
FROM table_name
WHERE column_name
IN (value1,value2,..)
INSERT INTOINSERT INTO table_name
VALUES (value1, value2, value3,....)
or
INSERT INTO table_name
(column1, column2, column3,...)
VALUES (value1, value2, value3,....)
INNER JOINSELECT column_name(s)
FROM table_name1
INNER JOIN table_name2
ON table_name1.column_name=table_name2.column_name
LEFT JOINSELECT column_name(s)
FROM table_name1
LEFT JOIN table_name2
ON table_name1.column_name=table_name2.column_name
RIGHT JOINSELECT column_name(s)
FROM table_name1
RIGHT JOIN table_name2
ON table_name1.column_name=table_name2.column_name
FULL JOINSELECT column_name(s)
FROM table_name1
FULL JOIN table_name2
ON table_name1.column_name=table_name2.column_name
LIKESELECT column_name(s)
FROM table_name
WHERE column_name LIKE pattern
ORDER BYSELECT column_name(s)
FROM table_name
ORDER BY column_name [ASC|DESC]
SELECTSELECT column_name(s)
FROM table_name
SELECT *SELECT *
FROM table_name
SELECT DISTINCTSELECT DISTINCT column_name(s)
FROM table_name
SELECT INTOSELECT *
INTO new_table_name [IN externaldatabase]
FROM old_table_name
or
SELECT column_name(s)
INTO new_table_name [IN externaldatabase]
FROM old_table_name
SELECT TOPSELECT TOP number|percent column_name(s)
FROM table_name
TRUNCATE TABLETRUNCATE TABLE table_name
UNIONSELECT column_name(s) FROM table_name1
UNION
SELECT column_name(s) FROM table_name2
UNION ALLSELECT column_name(s) FROM table_name1
UNION ALL
SELECT column_name(s) FROM table_name2
UPDATEUPDATE table_name
SET column1=value, column2=value,...
WHERE some_column=some_value
WHERESELECT column_name(s)
FROM table_name
WHERE column_name operator value