In Oracle, if I needed to declare something with the same type as another column, I can simply use %type:
Create table foo(
copiedType OTHER_TABLE.COLUMN_NAME%TYPE
/* yada yada yada... */
Is there an equivalent operator in MySQL?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, the short answer, as it turns out is “no”, and while it can be faked if you’re willing to create a stored function (or use another language) and create your table by your own custom baked parsing engine, it simply isn’t worth it. C’est sera…