CodePudding user response:
Pick up pointsCodePudding user response:
Give you an example:The CREATE TABLE S
(SNO CHAR (4) NOT NULL,
SNAME CHAR (20) NOT NULL,
SADDR CHAR (20)
PRIMARY KEY (SNO));
CodePudding user response:
I want s to change, is every building table let s into a character I want to doCodePudding user response:
How no one answeredCodePudding user response:
The SQL statements embedded into a function,User's table name through a user interface to function parameters,
CodePudding user response:
How to do ah, don't understandCodePudding user response:
To study theCodePudding user response:
Still don't understand, function should be how to writeCodePudding user response:
Give you a suggestion:You'd better build two tables in database (or three)
Respectively is:
1, tabledictionary keep information such as the table name
2, columndictionary save field name information, if save the field type and length etc. There is no need for a third table, otherwise you can keep the field type and so on to the third list
3, the COLUMNATTRIBUTE preservation field type and length, etc.
Through these two or three tables can manage with the custom table, as to build table statements need according to the different database to dynamically build, this should not be too difficult