Today’s TechTip is a two-for-one. I’ll talk about SQL’s OVRDBF replacement, ALIAS, and a simple yet dangerous SQL statement, DROP. Keep reading to find out more.
By Rafael Victória-Pereira
Let’s start with ALIAS. In a nutshell, we can say that ALIAS is Override Database File (OVRDBF) made simple, practical, and permanent.
If you ever used the OVRDBF CL command, then the functionality provided by ALIAS should be easy to grasp; it’s exactly the same! If you never used OVRDBF, it’s a way to use an alternate name for a file or, most importantly, a member of a file. This is especially important because you can’t specify a file member in SQL. The file member concept is an IBM i peculiarity, and SQL has no idea how to handle it. Fortunately, the CREATE ALIAS SQL instruction allows you to create a name for a given member of a file.