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’

“SQL Syntax”의 320개의 댓글

  1. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. Wonderful beat ! I wish to apprentice even as you amend your web site, how could i subscribe for a weblog site?

    The account helped me a applicable deal. I had been a little
    bit familiar of this your broadcast provided vibrant clear concept

  13. Very nice post. I just stumbled upon your weblog and wished
    to say that I’ve truly enjoyed surfing around your blog posts.

    In any case I will be subscribing to your rss feed and I
    hope you write again soon!

  14. 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.

  15. 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.

  16. 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

  17. 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.

  18. 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!

  19. 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

  20. 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

  21. 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.

  22. 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

  23. 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.

  24. 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.

  25. 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

  26. 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!

  27. 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.

  28. 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?

  29. 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.

  30. 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.

  31. 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

  32. 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?

  33. 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.

  34. You could definitely visit your skills within the work you write.
    The arena hopes for more passionate writers as if you who aren’t afraid to say the direction they believe.
    Always follow your heart.

    Here is my web site :: JaredINikkel

  35. 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

  36. You made some decent points there. I checked on the internet for more info about the issue and found most individuals will go along with your views on this website.

  37. 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.

  38. 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.

  39. 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!

  40. 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.

  41. Hi! 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
    start. Do you have any ideas or suggestions?
    Cheers

  42. Hello, i believe that i saw you visited my weblog so i came to return the
    choose?.I’m trying to find issues to enhance my website!I suppose its adequate to use a
    few of your ideas!!

  43. This is very interesting, You are a very skilled blogger. I have joined
    your rss feed and look forward to seeking more of your excellent post.

    Also, I have shared your web site in my social networks!

  44. We’re a group of volunteers and starting a new
    scheme in our community. Your web site provided us with useful information to work on. You have performed an impressive task and our entire community will be grateful to you.

  45. I think this is among the most important information for me.
    And i am glad reading your article. But wanna remark on few general things, The
    website style is ideal, the articles is really great : D.
    Good job, cheers

  46. Write more, thats all I have to say. Literally, it seems as
    though you relied on the video to make your
    point. You definitely know what youre talking about, why waste your intelligence on just posting videos to your weblog when you could
    be giving us something enlightening to read?

  47. I like the helpful information you provide in your articles.
    I’ll bookmark your weblog and check again here regularly.
    I am quite sure I’ll learn many new stuff right here!

    Good luck for the next!

  48. Hello there, just became alert to your blog through Google, and found that it is
    really informative. I am gonna watch out for brussels.
    I will appreciate if you continue this in future. Lots of people will be benefited from your writing.
    Cheers!

  49. Nice post. I learn something new and challenging on sites I stumbleupon on a daily basis.

    It will always be useful to read articles from other writers and practice a little something
    from their sites.

  50. Hello! Quick question that’s completely off topic. Do
    you know how to make your site mobile friendly? My web site looks weird when browsing from my iphone 4.
    I’m trying to find a theme or plugin that might be able
    to fix this problem. If you have any suggestions, please share.
    Many thanks!

  51. You really make it appear really easy along with your
    presentation but I to find this matter to be really something
    which I believe I might never understand. It seems too complex and very vast for me.
    I am taking a look ahead on your next publish,
    I will try to get the grasp of it!

  52. Hey I know this is off topic but I was wondering if you knew of any widgets I could
    add to my blog that automatically tweet my newest twitter updates.
    I’ve been looking for a plug-in like this for quite some time
    and was hoping maybe you would have some experience with something like this.

    Please let me know if you run into anything.
    I truly enjoy reading your blog and I look forward to your new updates.

  53. I’m really enjoying the design and layout of your website.
    It’s a very easy on the eyes which makes it much more enjoyable for
    me to come here and visit more often. Did you hire
    out a designer to create your theme? Fantastic work!

  54. With havin so much content and articles do you ever
    run into any issues of plagorism or copyright violation? My site has a lot
    of unique content I’ve either written myself or outsourced but it seems a lot of
    it is popping it up all over the web without my permission. Do you know any
    methods to help reduce content from being stolen? I’d really appreciate it.

  55. Heya this is somewhat of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML.
    I’m starting a blog soon but have no coding knowledge so
    I wanted to get guidance from someone with experience.

    Any help would be greatly appreciated!

  56. Hey There. I discovered your blog the usage of msn. That is a really neatly written article. I’ll be sure to bookmark it and return to learn more of your helpful info. Thank you for the post. I will definitely return.

댓글 남기기