MYSQL是否具有表功能?

时间:2019-04-01 03:34:23

标签: mysql db2

在DB2中,我可以使用类似表的功能

SELECT ELEMENTS
FROM  TABLE (AB_OWN.ELEMENTS (pv_token_id)) AS T

我想知道MYSQL是否具有类似的功能? 如何将其翻译成MYSQL语言?

1 个答案:

答案 0 :(得分:1)

根据mysql8文档, public class CustomAdapter extends BaseAdapter { Context mContext; TextView nameView; TextView phoneNumberView; TextView accountView; String name; String phoneNumber; String accountNumber; ArrayList<Consumer> objects; public CustomAdapter(Context context, int resource, ArrayList<Consumer> objects){ this.objects = objects; this.mContext = context; } public CustomAdapter(){ } @Override public int getCount() { return objects.size(); } @Override public Object getItem(int position) { return objects.get(position); } @Override public long getItemId(int position) { return 0; } @Override public View getView(int position, View convertView, ViewGroup parent) { Consumer consumer = (Consumer) getItem(position); // Values to be displayed. name = consumer.getName(); phoneNumber = consumer.getPhoneNumber(); accountNumber = consumer.getAccountNumber(); LayoutInflater inflater = LayoutInflater.from(mContext); // generate an inflater using context. convertView = inflater.inflate(R.layout.details_layout,null); // inflate details_layout and store it in convertView. nameView = convertView.findViewById(R.id.nameView); phoneNumberView = convertView.findViewById(R.id.phoneNumberView); accountView = convertView.findViewById(R.id.accountView); nameView.setText(name); phoneNumberView.setText(phoneNumber); accountView.setText(accountNumber); return convertView; } } 语句当前不支持SQL标准表函数。

您将需要一种替代方法,例如使用函数或过程填充表,然后从该表中进行选择,或者采用类似的方法。