Need help trying to create a table using CREATE TABLE ... LIKE, code is below, error given is
Incorrect syntax near the keyword 'LIKE'
CREATE TABLE jobserve_reports LIKE Jobserve
I've tried putting the LIKE in quotations with no luck, tried making it a temporary table, using curly braces and nothing has worked. Am at my wits end.
In SQL Server, we can create using:
SELECT *
INTO newtable
FROM oldtable
WHERE 1 = 0;
If LIKE is not available in your db you could use create select
CREATE TABLE jobserve_reports AS
select * from Jobserve
or equivalent
eventuallly using
CREATE TABLE jobserve_reports AS
select * from Jobserve
where 1 = 2
for get no result
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With