Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

how to create an SQL table in ruby

def self.create_table
    sql = <<-SQL
      CREATE TABLE IF NOT EXISTS students (
        name TEXT,
        grade TEXT
      )
    SQL
    DB[:conn].execute(sql)
  end
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #SQL #table #ruby
ADD COMMENT
Topic
Name
5+1 =