megumin.org
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
andioop@programming.dev to Programmer Humor@programming.devEnglish · 15 days ago

Little Timmy Tables

programming.dev

message-square
5
link
fedilink
6

Little Timmy Tables

programming.dev

andioop@programming.dev to Programmer Humor@programming.devEnglish · 15 days ago
message-square
5
link
fedilink
alert-triangle
You must log in or # to comment.
  • NullPointerException@lemmy.ca
    link
    fedilink
    arrow-up
    1
    ·
    15 days ago

    Why would Santa need two separate tables for this?

    • unalivejoy@lemmy.zip
      link
      fedilink
      arrow-up
      1
      ·
      15 days ago

      I would make two separate views.

      CREATE VIEW NiceList AS
       SELECT * FROM Children
        WHERE behavior = 'nice' 
         AND parent.income > 40000; 
      CREATE VIEW NaughtyList AS
       SELECT * FROM Children
        WHERE behavior = 'naughty'; 
      
      • KairuByte@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        0
        ·
        15 days ago

        Why are we using magic strings for behavior?

        • unalivejoy@lemmy.zip
          link
          fedilink
          arrow-up
          0
          ·
          15 days ago

          Feel free to fork my comment.

          • branch@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            1 day ago
            CREATE VIEW NiceList AS
             SELECT * FROM Children
              WHERE behavior > 2000
               AND parent.income > 40000; 
            CREATE VIEW NaughtyList AS
             SELECT * FROM Children
              WHERE behavior <= 2000; 
            

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 639 users / day
  • 2.7K users / week
  • 2.72K users / month
  • 2.73K users / 6 months
  • 1 local subscriber
  • 28.1K subscribers
  • 88 Posts
  • 580 Comments
  • Modlog
  • mods:
  • adr1an@programming.dev
  • Feyter@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.14
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org