I have this database setup:
http://sqlfiddle.com/#!12/b2989
I want to add a record called “solrID” under item where I already have “ID”.
Is it possible to have SQL setup so whenever an entry gets put into ID I also add the same value into SOLRID, except I start it with the text “app”.
Therefore, when I add a record to my “item” table, ID autoincrements to have a value of say “2” then I want SOLRID to automatically have the value “app2“.
Is this possible?
Two choices that comes to mind is create a view that creates solrID on the fly, or if you really want to have a column that stores what is basically redundant data you can use a trigger to populate solrID.
For me, knowing only what I know from your message I would consider using a view unless you have a really reason to store solrID in the actual table.