Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require_relative '../db/connection'
- def temp_table
- ActiveRecord::Base.connection.execute('BEGIN;')
- ActiveRecord::Base.connection.execute('CREATE TABLE list_words ( id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, name TEXT);')
- ActiveRecord::Base.connection.execute('INSERT INTO list_words (name) values ("Pera"),("Manzana"),("Naranja");')
- ActiveRecord::Base.connection.execute('SELECT * FROM list_words;')
- ActiveRecord::Base.connection.execute('ROLLBACK;')
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement