1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Inserting a row with a set.

Discussion in 'Databases' started by blackbug, Dec 15, 2005.

  1. #1
    I'm trying to remember how insert a row into a database where one of the columns is a set. I'm trying:

    
    INSERT INTO company (name, url, services_offered)
    VALUES('company1', 'companyurl1', ('service2', 'service1'))
    
    Code (markup):
    
    INSERT INTO company (name, url, services_offered)
    VALUES('company1', 'companyurl1', VALUES('service2', 'service1'))
    
    Code (markup):
    
    INSERT INTO company (name, url, services_offered)
    VALUES('company1', 'companyurl1', SET('service2', 'service1'))
    
    Code (markup):
    And anything else I can invent :)

    I've set the right values for the column when defining the table.

    But I can't remember how to do it. Someone put me out of my misery, please!
    SEMrush
     
    blackbug, Dec 15, 2005 IP
    SEMrush
  2. l234244

    l234244 Peon

    Messages:
    1,225
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What exactly is the SET command doing, determining the length of characters before wrapping text?
     
    l234244, Dec 15, 2005 IP
  3. Sham

    Sham Peon

    Messages:
    136
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I think he means list of values?....
     
    Sham, Dec 22, 2005 IP
  4. blackbug

    blackbug Peon

    Messages:
    1,002
    Likes Received:
    89
    Best Answers:
    0
    Trophy Points:
    0
    #4
    :) Thanks. Yeah.

    I worked it out now.

    Something along the lines of:

    INSERT INTO company (name, url, services_offered)
    VALUES('company1', 'companyurl1', 'service2,service1')
    Code (markup):
     
    blackbug, Dec 23, 2005 IP