TOP

SQL: Insert Query

The local variables here can be ones you send to your stored procedure, local variables, whatever.

The first set of parenthesisW “()” contains the list of fields you want to put data in, like telling someone to stuff a flyer in certain mailboxes (except for that being illegal). The second list is the values or data you actually want to insert, so these are the names of the flyers (again, illegal, unless you live on “bad bad, do whatever you want, we don’t arm the postal service here” island. Otherwise known as SecondLife).

INSERT INTO (id,name,type) VALUES (@id,@name,@type)

ON a personal note, I find INSERT INTO sorta vulgar in a way, but hey, if you play with databases all day (another bad way to say it) you know that sometimes you want to INSERT anything you can find into the database to get it to play nice. Like a bomb, pot of coffee, titanium sporks, whatever. Pick your poison.

  • RSS
  • email
  • Facebook
  • Twitter
  • del.icio.us

Leave a Reply