I have an assignment that I have to create a patient table in the database. I am not sure where I do this. This is example of what I have to do:

Create Table

Med rec NO

las name

first name

where do I input this information because I have to do a query to the database to ensure that I have created this table. This is the information that I have to query:

select table_name from user_tables;

This may be a silly question but I am not that computer literate. Please help

Re: SQL syntax

Lakshmi N

create table syntax

create table patient ;

(pid C(5), fname c(30), lname C(30), add1 C(30), add2 C(30), add3 C(30), city C(30))

this creats a table patient (free table)

if u want it to be a part of database, then create database first.

all this u have to do after click on foxpro icon and after u go to command window.

after this u can input data


insert into


just browse and use ctrl+n to add records

select * from patient gives you all the records from patient.dbf

Re: SQL syntax

Naomi Nosonovsky

Based on your question only it looks to me that this question is either for SQL Server or for Oracle database or another back-end. But it doesn't sound as VFP back-end. Please correct me if I'm wrong.

If it is indeed for VFP, then as already have been said, you need to check CREATE TABLE command syntax in Help. You then can check using INDBC() funciton if your table is a part of a database. You can also create your table in the designer.

Re: SQL syntax

Lakshmi N

thanks for indbc() command.

can u kindly send me a priavate mail giving your mailid at so that i can clarrify some doubts.

Re: SQL syntax

Naomi Nosonovsky

Sorry for the off-topic. I did send an e-mail to you in the morning. Didn't receive anything back. Would be out till Friday.