⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 create.c

📁 一个c语言开发的小型的dbms系统
💻 C
字号:
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "struct.h"

void create(struct	_createstruct *cs)
{
	char  table[10];
	char fields[10][30];
	int col_type[10],col_lenth[100],number;
	int i=0;
	struct	_createfieldsdef *field;
	 strcpy(table,cs->table);
	field=cs->fdef;
	while (field!=NULL)
		{
			strcpy(&fields[i],field->field);
			col_type[i]=atoi(field->type);
			col_lenth[i]=atoi(field->length);
			i=i+1;
			field=field->next_fdef;
		}
	number=i;
	create_table(&table,&fields,&col_type,&col_lenth,number);
}

void drop(struct	_dropstruct *drs)
{
	char  table[10]; 
	strcpy(table,drs->table);
	drop_table(&table);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -