If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > How to create a VIEW in Mysql 5.0?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-23-04, 08:59
vb_bhatnagar vb_bhatnagar is offline
Registered User
 
Join Date: Jul 2004
Posts: 1
How to create a VIEW in Mysql 5.0?

Dear All,

I am facing a problem in regarding the view creation in the MYSQL version 5.0.0-alpha.

I got the syntax to create views, but it is not working. Here, I am specifying the complete syntax, which I am using for creating the view.

*************************************
1. I created a table with the name “test” like -
create view test_vw as (select * from test) ;

2. Then, I inserted two rows in this table like -
insert into test('1', 'ABC');
insert into test('2', 'XYZ');

3. Now, I want to create a view on this table with the specified query -
create view test_vw as (select * from test where id=’1’) ;

But I am getting the error like –
ERROR 1064 (42000): You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use near 'view
test_vw as (select * from test)' at line 1

*************************************

Can anybody sent a sample for creating a view in the MYSQL. It will really help me a lot.

Thanks in advance for your solution towards this problem.

With Regards
Vishal
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On