메뉴 닫기

SQL Syntax

The SQL Syntax

 
SQL was designed to be entered on a console and results would display back to a screen.
Today, SQL is mostly used by programmers who use SQL inside their language to build applications that access data in a database.
 
Four fundamental operations that apply to any database are:
 

  1. Read the data  —  SELECT
  2. Insert new data  —  INSERT
  3. Update existing data  —  UPDATE
  4. Remove data  —  DELETE

 
Collectively these are referred to as CRUD (Create, Read, Update, Delete).
The general form for each of these 4 operations in SQL is presented next.
 


 

The SQL SELECT general form

  1. SELECT columnnames
  2. FROM tablename
  3. WHERE condition
  4. ORDER BY sortorder

Example:

  1. SELECT FirstName, LastName, City, Country
  2. FROM Customer
  3. WHERE City = ‘Paris’
  4. ORDER BY LastName

 


 

The SQL INSERT general form

  1. INSERT tablename (columnnames)
  2. VALUES (columnvalues)

Example:

  1. INSERT Supplier (Name, ContactName, City, Country)
  2. VALUES (‘Oxford Trading’, ‘Ian Smith’, ‘Oxford’, ‘UK’)

 


 

The SQL UPDATE general form

  1. UPDATE tablename
  2. SET columnname = columnvalue
  3. WHERE condition

Example:

  1. UPDATE OrderItem
  2. SET Quantity = 2
  3. WHERE Id = 388

 


 

The SQL DELETE general form

  1. DELETE tablename
  2. WHERE condition

Example:

  1. DELETE Customer
  2. WHERE Email = ‘alex@gmail.com’

230 Comments

  1. binary options

    Next time I read a blog, I hope that it doesn’t fail me just as much
    as this one. I mean, I know it was my choice to read, nonetheless I really thought you would
    probably have something interesting to talk about. All I hear
    is a bunch of crying about something that you could fix
    if you weren’t too busy searching for attention.

  2. binary trading

    Having read this I thought it was rather enlightening. I appreciate you finding the time and energy to put this content together.
    I once again find myself spending way too much time both reading
    and posting comments. But so what, it was still
    worth it!

  3. binary today 5

    The next time I read a blog, I hope that it won’t disappoint me as much as this one.
    After all, I know it was my choice to read, nonetheless I truly believed you would have something useful to
    talk about. All I hear is a bunch of moaning about something that you could possibly fix if you weren’t too busy looking for attention.

  4. Binary Today Review

    Can I simply just say what a relief to find someone that genuinely knows what they’re discussing on the web.
    You certainly know how to bring an issue to light and
    make it important. A lot more people really need to check
    this out and understand this side of your story. I can’t believe
    you aren’t more popular because you surely have
    the gift.

  5. binary trading

    An intriguing discussion is definitely worth comment.

    I do believe that you ought to write more on this topic, it may not be a taboo matter but usually
    people don’t speak about such issues. To the next! Cheers!!

  6. binary today

    Can I just say what a relief to find someone that really knows what they’re discussing
    over the internet. You certainly know how to bring an issue
    to light and make it important. More people have to look at this and understand this side
    of your story. It’s surprising you’re not more popular given that you definitely possess the gift.

  7. binary today

    Hi there! This post could not be written much better! Going
    through this post reminds me of my previous roommate! He continually kept talking about this.
    I am going to forward this post to him. Pretty sure he will have a
    great read. Thank you for sharing!

  8. binary trading

    I must thank you for the efforts you have put in writing this blog.
    I am hoping to see the same high-grade content from you in the future as well.
    In truth, your creative writing abilities has inspired me to get my own, personal blog now 😉

  9. www.jlo-pics.Com

    I’d like to thank you for the efforts you have put in writing
    this site. I really hope to see the same high-grade blog posts from you later
    on as well. In fact, your creative writing abilities has
    motivated me to get my own, personal blog now 😉

  10. boekhouding breda

    Hi there, I discovered your website by way of Google while looking for a comparable topic, your website got here up, it
    seems to be good. I have bookmarked it in my google bookmarks.

    Hi there, simply was alert to your blog via Google, and located that it is truly informative.

    I am going to be careful for brussels. I’ll be grateful in the
    event you continue this in future. Many other folks will probably be benefited from your writing.
    Cheers!

  11. important site

    Great goods from you, man. I have take into account your stuff prior to and you are
    just extremely excellent. I really like what you’ve obtained right here, certainly like what
    you are saying and the way through which you say it.

    You are making it enjoyable and you still take care
    of to keep it smart. I cant wait to read much more
    from you. This is actually a great web site.

  12. tinyurl.com

    Thank you for every other wonderful article.
    Where else may just anybody get that type of information in such a perfect
    method of writing? I have a presentation next week, and I am at the search for such information.

  13. ChanceORauen

    I’m pretty pleased to find this web site. I wanted to thanks a lot for ones time only for this wonderful read!! I definitely appreciated every little bit of it and that i do you have saved to fav to look into new stuff on your site.

  14. YukoZWeigert

    Howdy! This article could not be written any better! Looking through this article reminds me
    of my previous roommate! He always kept preaching
    about this. I am going to forward this informative article to him.
    Confident he’ll have a great read. I appreciate you for sharing!

    my web site YukoZWeigert

  15. g

    Heya i’m for the first time here. I came across this board and I find It really helpful & it helped me out a lot.
    I am hoping to present one thing back and help others like you helped me.

  16. g

    I like the helpful information you supply to your articles.
    I’ll bookmark your weblog and take a look at again right here regularly.

    I’m slightly sure I will be told many new stuff proper right here!

    Good luck for the next!

  17. g

    Great blog! Is your theme custom made or did
    you download it from somewhere? A theme like yours with a few simple
    tweeks would really make my blog stand out. Please let me know where you got your design. Bless
    you

  18. DonteQWisher

    Today, I went to the beach with my kids. I found a sea shell and gave it
    to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She put
    the shell to her ear and screamed. There was a hermit crab inside
    and it pinched her ear. She never wants to go back!

    LoL I know this is entirely off topic but I had to tell someone!

    My page … DonteQWisher

  19. watch

    An outstanding share! I’ve just forwarded this onto a friend who had been doing a little homework on this. And he in fact ordered me dinner simply because I stumbled upon it for him… lol. So allow me to reword this…. Thanks for the meal!! But yeah, thanks for spending some time to talk about this subject here on your website.

  20. cbd oil that works 2020

    Good day! This is kind of off topic but I need some advice from an established
    blog. Is it very hard to set up your own blog? I’m not very techincal but I can figure
    things out pretty quick. I’m thinking about creating
    my own but I’m not sure where to begin. Do you have any ideas or suggestions?
    Cheers

  21. Techno Music Artists

    I blog quite often and I truly thank you for your content. The article has truly peaked my interest. I’m going to take a note of your website and keep checking for new details about once a week. I subscribed to your RSS feed as well.

  22. discover more

    Your article has proven useful to me. You are a very persuasive writer. I found your pages via Blog while searching for a related topic, your website came up and I am glad it did Ever since the day I first saw your website I have been applying your suggestions and they’ve greatly improved my day to day life.

  23. Online Pharmacy

    Leading Online Pharmacy – Contact us at +1 (917) 259-3352 for unbelievable rates, discount and offers on any medicine. Get it delivered free of cost at your door steps, call us today. Phone : +1 (917) 259-3352

  24. indian visa online

    Right here is the perfect blog for anybody who would like to understand this topic. You know a whole lot its almost hard to argue with you (not that I really will need to…HaHa). You definitely put a brand new spin on a subject that has been discussed for decades. Excellent stuff, just excellent!

  25. best site

    Nice write up. My hands often still sweat to this day when I talk about them her.|It’s like you wrote the book on it or something.|It’s like you read my thoughts!|You appear to know a lot about this. Good job on this article! I enjoyed reading what you had to say.

  26. cbd face cream

    I’m the proprietor of JustCBD Store company (justcbdstore.com) and I am currently seeking to grow my wholesale side of company. I really hope that someone at targetdomain is able to provide some guidance ! I thought that the very best way to do this would be to reach out to vape shops and cbd retail stores. I was hoping if anyone could suggest a qualified site where I can get Vape Shop B2B Sales Leads I am already examining creativebeartech.com, theeliquidboutique.co.uk and wowitloveithaveit.com. Not exactly sure which one would be the most suitable selection and would appreciate any assistance on this. Or would it be much simpler for me to scrape my own leads? Suggestions?

  27. ebiz

    Hi, I do believe this is an excellent blog. I stumbledupon it 😉 I’m going to return once again since i have book marked it. Money and freedom is the best way to change, may you be rich and continue to guide others.

  28. dandruff

    I was extremely pleased to uncover this great site. I need to to thank you for ones time just for this fantastic read!! I definitely enjoyed every part of it and i also have you book marked to look at new information in your web site.

  29. content hosting

    Neat blog! Is your theme custom made or did you
    download it from somewhere? A design like yours with a
    few simple adjustements would really make my blog jump out.
    Please let me know where you got your theme. Appreciate it

  30. cbd tincture

    I’m the owner of JustCBD brand (justcbdstore.com) and I’m presently trying to grow my wholesale side of company. I really hope that someone at targetdomain is able to provide some guidance ! I considered that the most suitable way to do this would be to connect to vape companies and cbd retailers. I was really hoping if anybody at all could suggest a trustworthy website where I can buy CBD Shops Business Mailing List I am currently considering creativebeartech.com, theeliquidboutique.co.uk and wowitloveithaveit.com. Not sure which one would be the very best selection and would appreciate any guidance on this. Or would it be simpler for me to scrape my own leads? Suggestions?

  31. Digital Marketing

    I blog often and I genuinely appreciate your content. The article has truly peaked my interest. I’m going to book mark your blog and keep checking for new details about once a week. I opted in for your Feed as well.

  32. TimmyFNeives

    Hi there, just became alert to your weblog via Google,
    and found that it’s really informative. I am likely to take care for
    brussels. I’ll be grateful for those who continue this in future.
    Many folks could be benefited out of your writing.
    Cheers!

    my website; TimmyFNeives

  33. Isidro Osteen

    This information is magnificent. Nice write up. Good job on this article! As I apply more of your tips to my daily life I can see how your education has turned you into a top professional in this field.

  34. Turkey Tours

    I blog often and I really appreciate your content. Your article has truly peaked my interest. I will book mark your site and keep checking for new details about once a week. I opted in for your Feed too.

  35. Horchata

    I truly love your website.. Great colors & theme. Did you make this web site yourself? Please reply back as I’m looking to create my own personal blog and would love to learn where you got this from or what the theme is named. Many thanks!

  36. one vine

    There sure has to be some kind of really addictive quality about your website because I can’t stay away for more than a few hours without visiting. This is an excellent, an eye-opener for sure! Thumbs up! I really like your article.

댓글 남기기

이메일은 공개되지 않습니다.